I'm new to JAVA.
I need to run a JFrame named MainFrame
in maximized mode.
How can I do it?
public class MainFrame extends javax.swing.JFrame {
/**
* Creates new form MainFrame
*/
public MainFrame() {
initComponents();
}
You should use JFrame.setExtendedState
:
public MainFrame() {
initComponents();
setExtendedState(java.awt.Frame.MAXIMIZED_BOTH);
}