I have a JFrame which uses JPanel initialized from the JPanel.
This is the JFrame class : LoginPage
public class LoginPage extends JFrame
{
private JPanel contentPane;
static int cnf;
static String data;
private static LoginPage frame;
/**
* Launch the application.
*/
public static void main(String[] args)
{
EventQueue.invokeLater(new Runnable()
{
public void run()
{
try
{
frame = new LoginPage();
frame.setVisible(true);
}
catch (Exception e)
{
e.printStackTrace();
}
}
});
//cnf = chk;
if( cnf == 1)
{
frame.dispose();
JFrame m = new MainPage();
m.setVisible(true);
}
}
/**
* Create the frame.
*/
public LoginPage()
{
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JPanel m = new MainLogin();
m.setBounds(0, 0, 448, 271);
contentPane.add(m);
}
}
And, this is the JPanel class : MainLogin
public class MainLogin extends JPanel
{
private JTextField uname;
private JPasswordField pass;
public static int chk;
public MainLogin()
{
setLayout(null);
uname = new JTextField();
uname.setBounds(236, 22, 167, 25);
add(uname);
uname.setColumns(10);
pass = new JPasswordField();
pass.setBounds(236, 53, 167, 25);
add(pass);
JButton login = new JButton("Login");
login.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
String u = uname.getText();
char[] tp = pass.getPassword();
String p = new String(tp);
chk = authentication.verify(u, p);
System.out.println(chk);
}
});
login.setBounds(235, 90, 117, 25);
add(login);
}
}
As in the MainLogin Panel, there is a class authentication who has a method verify(), which returns an integer, and this integer is stored in chk.
Since, this chk resides in MainLogin JPanel class, I want to pass it to the LoginPage JFrame class.
Is there any way to do this other than using a File?
Open the main page from LoginPage instance not from the main method.
Add a login() method to the LoginPage
public class LoginPage extends JFrame {
//other parts
public static void main(String[] args)
{
EventQueue.invokeLater(new Runnable()
{
public void run()
{
try
{
frame = new LoginPage();
frame.setVisible(true);
}
catch (Exception e)
{
e.printStackTrace();
}
}
});
}
public LoginPage() {
//...
JPanel m = new MainLogin(this);
//...
}
public void login(int chk) {
JFrame m = new MainPage();
m.setVisible(true);
this.dispose();
}
}
And pass login frame to the panel as a parameter
public class MainLogin extends JPanel
{
private int chk;//no need to be static
public MainLogin(final LoginFrame loginFrame)
{
setLayout(null);//null layout is bad
//...
login.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
//...
chk = authentication.verify(u, p);
loginFrame.login(chk);
}
});
//...
}
}
Not only does this question get asked quite a bit, it also has a number of possible solutions, including using a modal dialog or Observer Pattern depending on your needs
See How to Make Dialogs for more details
You might also like to take a look at
Open JFrame, only after successfull login verification with database. Using Eclipse?
Java and GUI - Where do ActionListeners belong according to MVC pattern?
for more discussion on the subject
The basic answer here is, you want to separate the areas of responsibility.
You need to:
Gather the user credentials
Validate those credentials
Take a appropriate action based on the success of that check
These are three distinct actions, all which should be separated, it's not the responsibility of the login panel to validate the credentials, that's someone else's responsibility, equally, it's not the validators responsibility to decide what should be done when the validation fails or succeeds, that's someone else's responsibility
Related
I want to know how to open this JFrame form (1) when I click a button in the second JFrame (2). The problem is that I am unable to get the .setVisible method in the Form 2. Please help. Thanks & Regards ! :)
Form 1 (to be opened when a button is clicked on Form 2
public class FlightForm {
public FlightForm() {
initialize();
}
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
FlightForm window = new FlightForm();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
Form 2
public class MainMenu{
private JFrame frame;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MainMenu window = new MainMenu();
window.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public MainMenu() {
frame = new JFrame("Main Menu");
setBounds(100, 100, 830, 574);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
JButton btnNewButton = new JButton("Flight Form");
);
btnNewButton.setFont(new Font("Candara", Font.BOLD, 15));
btnNewButton.setBounds(169, 328, 193, 77);
frame.getContentPane().add(btnNewButton);
JButton btnNewButton_1 = new JButton("Passenger Form");
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
PassengerForm window = new PassengerForm();
window.setVisible(true); // This is not working
You can call setVisible(true) on PassengerForm() only if PassengerForm class extends JFrame. If no you should use something like:
PassengerForm window = new PassengerForm();
window.getFrame().setVisible(true)
i have a MainWindow class which has main method,its constructor and initialize() method. The initialize() method has frame, Jbutton and a final Jtextarea. The actionPerformed() is in the another class Data which handles ActionListener. I want to display some text after the button is pressed in the Jtextfield which is inside only private variable frame of the MainWindow class.I haven't mentioned the Application logic, help me interact with it and GUI.. thank you !!!!!
The MainWindow class:
public class MainWindow {
private JFrame frame;
public Data data;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MainWindow window = new MainWindow();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public MainWindow() {
this.data = new Data();
initialize();
}
private void initialize(){
frame = new JFrame();
frame.setBounds(100, 100, 396, 469);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
final JTextArea textarea = new JTextArea();
textarea.setFont(new Font("Dialog", Font.PLAIN, 75));
textarea.setTabSize(15);
textarea.setBounds(12, 28, 370, 85);
frame.getContentPane().add(textarea);
JButton button7 = new JButton("7");
button7.addActionListener(this.data); // Data data class has the actionperformed() method
button7.setActionCommand("7");
button7.setBounds(12, 125, 65, 73);
frame.getContentPane().add(button7);
}
}
Then the class Data is:
public class Data implements ActionListener {
public String s;
public Data(){
//constructor
}
public void actionPerformed(ActionEvent e) {
// this will set string s with some string
// that has to be returned to be displayed
// in the Jtextarea of the frame in MainWindow
}
public string returnString(){
return s;
}
i just want to set the JtextArea of the frame variable in MainWindow class..please help
If I understand correctly, you can simply pass the reference of the TextArea to your ActionListener via getter or constructor. Here I just used getter
public class Data implements ActionListener {
public JTextArea textArea;
public Data() {
//constructor
}
// here I used setter
public void setTextArea( JTextArea textArea ) {
this.textArea = textArea;
}
public void actionPerformed(ActionEvent e) {
// this will work, if you click the button 7
textArea.setText("Any modification you want");
}
}
And add this code in your initialize() method after textarea initialization
this.data.setTextArea(textarea);
Hope it helps.
UPDATE
public class MainWindow {
private JFrame frame;
public Data data;
final JTextArea textarea;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MainWindow window = new MainWindow();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
public class Data implements ActionListener {
public String s;
public MainWindow mainWindow;
public Data( MainWindow mainWindow ) {
this.mainWindow = mainWindow;
//constructor
}
public void actionPerformed(ActionEvent e) {
s = "test";
// this will set string s with some string
// that has to be returned to be displayed
// in the Jtextarea of the frame in MainWindow
mainWindow.updateTextArea(s);
}
public String returnString() {
return s;
}
}
That is just a simple implementation.
Basically.. I made a JDialog using swing. And now I want it to return a value to the JFrame that called it. Problem is, whenever I call the constructor for the JDialog, it won't block the thread even though I've set setModal(true). Am I missing something obvious here?
private final JPanel contentPanel = new JPanel();
private File chosenFile = null;
private JList list;
private File[] files;
public File getInformation()
{
return chosenFile;
}
/**
* Create the dialog.
*/
public PatientPicker(JFrame parent)
{
super(parent);
setModal(true);
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
setLocationRelativeTo(parent);
setBounds(100, 100, 450, 396);
getContentPane().setLayout(new BorderLayout());
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
getContentPane().add(contentPanel, BorderLayout.CENTER);
files = new File(ClientInfo.GetAppData() + "/patients").listFiles(new TextFileFilter());
{
JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
getContentPane().add(buttonPane, BorderLayout.SOUTH);
{
JButton okButton = new JButton("OK");
okButton.addMouseListener(new MouseAdapter() {
#Override
public void mouseClicked(MouseEvent arg0) {
if(files.length != 0)
chosenFile = files[list.getSelectedIndex()];
dispose();
}
});
okButton.setActionCommand("OK");
buttonPane.add(okButton);
getRootPane().setDefaultButton(okButton);
}
{
JButton cancelButton = new JButton("Cancel");
cancelButton.addMouseListener(new MouseAdapter() {
#Override
public void mouseClicked(MouseEvent arg0) {
dispose();
}
});
cancelButton.setActionCommand("Cancel");
buttonPane.add(cancelButton);
}
}
}
And then here is how I create it:
PatientPicker patientPicker = new PatientPicker(frmReportGenerator);
File dataFile = patientPicker.getInformation();
You state:
Problem is, whenever I call the constructor for the JDialog, it won't block the thread even though I've set setModal(true). Am I missing something obvious here?
The constructor will never block the event thread. Modality means that the event thread is blocked only when you call setVisible (true) on your modal dialog (as per the api).
Unrelated problem: you should not use MouseListeners on JButtons but rather ActionListeners. Otherwise you will run into major problems now, such as when you press the file via the space bar, and while it does depress, nothing happens, and in later code, such as say when you make the button disabled, and yet it is still functioning, even though it looks disabled.
Now if you are still having problems, then you may wish to post more code, a minimal code example program which would allow us to understand and experience your problem.
Edit
You state:
Yes. The user chooses a file in the JDialog and I want it to return to the JFrame that called it.
Why not just use a JFileChooser modal dialog?
Edit 2
An example using a JOptionPane:
import java.awt.event.*;
import javax.swing.*;
#SuppressWarnings("serial")
public class SwingFoo extends JPanel {
private JTextField fileField = new JTextField(20);
private JButton showDialog = new JButton(new ShowDialogAction("Show Dialog",
KeyEvent.VK_D, this));
public SwingFoo() {
fileField.setEditable(false);
fileField.setFocusable(false);
add(new JLabel("File Selected:"));
add(fileField);
add(showDialog);
}
public void setFileFieldText(String text) {
fileField.setText(text);
}
private static void createAndShowGui() {
SwingFoo mainPanel = new SwingFoo();
JFrame frame = new JFrame("SwingFoo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(mainPanel);
frame.pack();
frame.setLocationByPlatform(true);
frame.setVisible(true);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGui();
}
});
}
}
#SuppressWarnings("serial")
class ShowDialogAction extends AbstractAction {
private SwingFoo swingFoo;
public ShowDialogAction(String name, int mnemonic, SwingFoo swingFoo) {
super(name);
putValue(MNEMONIC_KEY, mnemonic);
this.swingFoo = swingFoo;
}
#Override
public void actionPerformed(ActionEvent e) {
PatientPicker patientPicker = new PatientPicker();
int result = JOptionPane.showConfirmDialog(swingFoo, patientPicker,
"Select Something", JOptionPane.OK_CANCEL_OPTION);
if (result == JOptionPane.OK_OPTION) {
swingFoo.setFileFieldText(patientPicker.getSelectedItem());
}
patientPicker.setVisible(true);
}
}
#SuppressWarnings("serial")
class PatientPicker extends JPanel {
private static final String[] ITEMS = {"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Sunday", "Fubar", "Snafu", "DILLIGAF", "BOHICA"};
private JList<String> selectionList = new JList<>(ITEMS);
public PatientPicker() {
add(new JScrollPane(selectionList));
selectionList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
public String getSelectedItem() {
return selectionList.getSelectedValue();
}
}
What you need to do is have a way to send a notification to your main window once the user has completed interacting with the dialog assuming they clicked the ok button.
You can do this by creating an anonymous class and passing that along in the constructor of your Dialog.
let's assume that you open the dialog with a button called openDialogBtn from the main window:
openDialogBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new PatientPicker(this, new FileSelectionNotifier() {
public void okButtonPressed(File chosenFile) {
// do whatever you need to do with the file (assign to a member variable
// or call another thread to do some kind of processing
}
});
In your dialog window you would need to have something like this:
okButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
// notify that the ok button was pressed
fileSelectionNotifier.okButtonPressed(chosenFile);
}
}
I've got class 'Frame' which extends JFrame and separetad JPanels: MainMenu and SinglePanel
I am using CardLayout, but I've got problem when switching back to panels using buttonSingle and powrot buttons. So my question is how can I change/swap between cards using these buttons?
My Frame class:
public class Frame extends JFrame{
CardLayout cl = new CardLayout();
final MainMenu menuPanel = new MainMenu();
final SinglePanel singlePanel = new SinglePanel();
public Frame(){
setLayout(cl);
add(menuPanel,"menu");
add(singlePanel,"single");
setSize(200, 200);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setVisible(true);
setEnabled(true);
swapView("menu");
}
public void swapView(String view){
cl.show(getContentPane(),view);
}
}
my MainMenu class:
public class MainMenu extends JPanel{
public MainMenu(){
setLayout(new BoxLayout(this , BoxLayout.Y_AXIS));
add(Box.createVerticalGlue());
JButton buttonSingle = new JButton("Single");
buttonSingle.setAlignmentX(Component.CENTER_ALIGNMENT);
buttonSingle.addActionListener(new ActionListener(){
#Override
public void actionPerformed(ActionEvent e) {
}
});
add(buttonSingle);
add(Box.createVerticalGlue());
JButton buttonMulti = new JButton("Multiplayer");
buttonMulti.setAlignmentX(Component.CENTER_ALIGNMENT);
buttonMulti.addActionListener(new ActionListener(){
#Override
public void actionPerformed(ActionEvent e) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
});
add(buttonMulti);
add(Box.createVerticalGlue());
JButton buttonExit = new JButton("Wyjście");
buttonExit.setAlignmentX(Component.CENTER_ALIGNMENT);
buttonExit.addActionListener(new ActionListener(){
#Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}});
add(buttonExit);
add(Box.createVerticalGlue());
}
}
my SinglePanel class
public class SinglePanel extends JPanel{
SinglePanel(){
setLayout(new FlowLayout());
JButton powrot = new JButton("Wróć do menu");
powrot.addActionListener(new ActionListener(){
#Override
public void actionPerformed(ActionEvent e) {
}
});
add(powrot);
}
}
Main class:
public class Main {
/**
* #param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
/*MainMenu mM = new MainMenu();*/
Frame f = new Frame();
}
}
You need a reference to the CardLayout of the JFrame inside your panel classes. What you can do is pass the Frame to the JPanel classes as reference, then you can use the CardLayout of the Frame in those classes to show or next etc. Something like
public class MainMenu {
private CardLayout layout;
private Frame frame;
public MainMenu(final Frame frame) {
this.frame = frame;
this.layout = (CardLayout)frame.getLayout();
JButton buttonSingle = new JButton("Single");
buttonSingle.setAlignmentX(Component.CENTER_ALIGNMENT);
buttonSingle.addActionListener(new ActionListener(){
#Override
public void actionPerformed(ActionEvent e) {
layout.show(frame, "single");
}
});
}
}
When you create the MainPanel, you need to pass Frame.this to it, referencing the current Frame
MainMenu menuPanel = new MainMenu(Frame.this);
EDIT
I just noticed your swapView method. So instead of use the CardLayout directly in the panel class, you can actually just call swapView in the actionPerformed
frame.swapView("single");
Or better yet, as to not expose the Frame class, you can have the Frame class implement an interface say SwapInterface that has a method swapView you need to override. And pass the SwapInterface to the panel classes. Something like
public interface SwapInterface {
public void swapView(String view);
}
public Frame extends JFrame implements SwapInterface {
MainMenu mainPanel = new MainMenu(Frame.this);
....
#Override
public void swapView(String view) {
cl.show(getContentPane(), view);
}
}
public class MainMenu extends JPanel {
private SwapInterface swap;
public MainMenu(SwapInterface swap) {
this.swap = swap;
...
public void actionPerfomed(ActionEvent e) {
swap.swapView("single");
}
}
}
Side Note
As HovercraftFullOfEels pointed out in his comment, you should make use of String contants for the String card values so there's no mistakes. Something like
private static final String SINGLE_CARD = "single";
Then in places where you use "single", use SINGLE_CARD instead
I Googled for a lot, and no solutions found. I think there shall be java masters to help me out ...
This is my initialize method:
private void initialize() {
this.setSize(750, 480);
this.setContentPane(getJContentPane());
this.setTitle("Registration");
JPanel topPane = new TopPane();
this.getContentPane().add(topPane,BorderLayout.PAGE_START);
cards=new JPanel(new CardLayout());
cards.add(step0(),"step0");
cards.add(step1(),"step1");
cards.add(step2(),"step2");
this.getContentPane().add(cards,BorderLayout.CENTER);
}
public JPanel step2(){
EnumMap<DPFPFingerIndex,DPFPTemplate> template = new EnumMap<DPFPFingerIndex, DPFPTemplate>(DPFPFingerIndex.class);
JPanel enrol = new Enrollment(template,2);
return enrol;
}
public JPanel step0(){
JPanel userAgree = new UserAgreement();
return userAgree;
}
public JPanel step1(){
JPanel userInfo = new UserInformation();
return userInfo;
}
public JPanel getCards(){
return cards;
}
This, is the method at another step0 JPanel:
jButtonAgree.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Registration reg = new Registration();
LayoutManager cards = reg.getCards().getLayout();
((CardLayout) cards).show(reg.getCards(),"step1");
}
});
No reation at all, i tried revalidate, repaint and other staff... doesn't work ... any one got any soution here!
It's all about exposing the right methods and constant Strings to the outside world to allow the class to swap views itself. For example, give your first class a private CardLayout field called cardlayout and a private JPanel field called cards (the card holder JPanel), and some public String constants that are used to add your card JPanels to the cards container. Also give it a public method, say called public void swapView(String key) that allows outside classes to swap cards... something like so:
// code corrected
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Registration extends JPanel {
// use these same constants as button texts later
private static final Dimension PREF_SIZE = new Dimension(450, 300);
public static final String USER_AGREEMENT = "User Agreement";
public static final String USER_INFO = "User Information";
public static final String ENROLLMENT = "Enrollment";
// we'll extract them from this array
public static final String[] KEY_TEXTS = {USER_AGREEMENT, USER_INFO, ENROLLMENT};
private CardLayout cardlayout = new CardLayout();
private JPanel cards = new JPanel(cardlayout);
public Registration() {
cards.add(createUserAgreePanel(), USER_AGREEMENT);
cards.add(createUserInfoPanel(), USER_INFO);
cards.add(createEnrollmentPanel(), ENROLLMENT);
setLayout(new BorderLayout());
add(cards, BorderLayout.CENTER);
}
#Override
public Dimension getPreferredSize() {
return PREF_SIZE;
}
private JPanel createEnrollmentPanel() {
JPanel enrol = new JPanel();
enrol.add(new JLabel("Enrollment"));
return enrol;
}
private JPanel createUserAgreePanel() {
JPanel userAgree = new JPanel();
userAgree.add(new JLabel("User Agreement"));
return userAgree;
}
private JPanel createUserInfoPanel() {
JPanel userInfo = new JPanel();
userInfo.add(new JLabel("User Information"));
return userInfo;
}
public void swapView(String key) {
cardlayout.show(cards, key);
}
}
Then an outside class can swap views simply by calling the swapView on the visualized instance of this class, passing in the appropriate key String such as in this case CardTest.USER_INFO to show the user info JPanel.
Now you have a problem with this bit of code where I indicate by comment:
jButtonAgree.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Registration reg = new Registration(); // **** HERE *****
LayoutManager cards = reg.getCards().getLayout();
((CardLayout) cards).show(reg.getCards(),"step1");
}
});
On that line you're creating a new Registration object, probably one that is completely unrelated to the one that is visualized on the GUI, and so calling methods on this new object will have absolutely no effect on the currently viewed gui. YOu need instead to get a reference to the viewed Registration object, perhaps by giving this class a getRegistration method, and then call its methods, like so:
class OutsideClass {
private Registration registration;
private JButton jButtonAgree = new JButton("Agree");
public OutsideClass() {
jButtonAgree.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// make sure registration reference has been obtained first!
if (registration != null) {
registration.swapView(Registration.USER_AGREEMENT);
}
}
});
}
// here I allow the calling class to pass a reference to the visualized
// Registration instance.
public void setRegistration(Registration registration) {
this.registration = registration;
}
}
For example:
#SuppressWarnings("serial")
class ButtonPanel extends JPanel {
private Registration registration;
public ButtonPanel() {
setLayout(new GridLayout(1, 0, 10, 0));
// go through String array making buttons
for (final String keyText : Registration.KEY_TEXTS) {
JButton btn = new JButton(keyText);
btn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (registration != null) {
registration.swapView(keyText);
}
}
});
add(btn);
}
}
public void setRegistration(Registration registration) {
this.registration = registration;
}
}
and the MainClass that drives this all
class MainClass extends JPanel {
public MainClass() {
Registration registration = new Registration();
ButtonPanel buttonPanel = new ButtonPanel();
buttonPanel.setRegistration(registration);
buttonPanel.setBorder(BorderFactory.createTitledBorder("Button Panel"));
registration.setBorder(BorderFactory.createTitledBorder("Registration Panel"));
setLayout(new BorderLayout());
add(registration, BorderLayout.CENTER);
add(buttonPanel, BorderLayout.SOUTH);
}
private static void createAndShowUI() {
JFrame frame = new JFrame("Registration");
frame.getContentPane().add(new MainClass());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
public static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
createAndShowUI();
}
});
}
}