How can I reuse my JFrame to show several GUIs one after the other, instead of creating a new JFrame for each?
Tag : java , By : mckasty
Date : March 29 2020, 07:55 AM
Any of those help You might use JInternalFrames if you like them, or simply use a main panel with a CardLayout, and display the appropriate card depending on the clicked menu item, or the selected JTree node (as it's done in Windows Explorer and similar applications). Use the Swing tutorial to get you started.
|
show a new jframe on another jframe close event
Tag : java , By : Pradeep Gowda
Date : March 29 2020, 07:55 AM
wish helps you You can add a Windows Listener to your frame. WindowListener myExitListener = new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
int confirmation = JOptionPane.showOptionDialog(jframe1, "Open frame2", "Open frame2", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
if (confirmation == 0) {
//open jframe2 here
}
}
};
jframe1.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
jframe1.addWindowListener(myExitListener);
|
In Java Jframe open another JFrame but JFrame show nothing
Tag : java , By : Cowtung
Date : March 29 2020, 07:55 AM
Hope that helps i do a java program with Eclipse Window Builder, there got 2 class Menu menu= new Menu();
menu.frame.setVisible(true);
|
How do you make Java JLabel show on JFrame after JFrame content is removed, revalidated, and repainted?
Tag : java , By : Nate Bedortha
Date : March 29 2020, 07:55 AM
wish of those help Call revalidate and repaint AFTER you have finished making the changes to the UI (remove AND add)
|
Opening a new jframe, and show the specified jpanel in that jframe
Date : March 29 2020, 07:55 AM
|