Java - AWT/Swing

maximize window

How it is to maximize the application window in Java shows the following code:


package com.sowas.javawiki;
 
import java.awt.*;
import javax.swing.*;
 
public class MaxFrame extends JFrame {
    public MaxFrame() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setExtendedState(JFrame.MAXIMIZED_BOTH);  // Here, the window is maximized
    }
 
    public static void main(final String[] args) {
       new MaxFrame().setVisible(true);
    }
}

Eigene Werkzeuge
Werkzeuge

gratis Counter by GOWEB
seit 9.10.2007