Αποτελέσματα Αναζήτησης
26 Ιαν 2009 · The way to set JFrame to full-screen, is to set MAXIMIZED_BOTH option which stands for MAXIMIZED_VERT | MAXIMIZED_HORIZ, which respectively set the frame to maximize vertically and horizontally
10 Μαρ 2011 · For an immediate maximise of your form just add this in the JFrame constructor after the InitiateComponents() call. this.setExtendedState(JFrame.MAXIMIZED_BOTH); The class extends JFrame of course:
17 Νοε 2023 · JFrame in Java is a class that allows you to crеatе and manage a top-lеvеl window in a Java application. It sеrvеs as thе main window for GUI-basеd Java applications and providеs a platform-indеpеndеnt way to crеatе graphical usеr intеrfacеs. In Java JFrame is a part of javax.swing package.
To maximize a JFrame window, you can use the setExtendedState method and pass in the JFrame.MAXIMIZED_BOTH constant as the argument. Maximize Jframe. For example: JFrame frame = new JFrame(); // maximize the frame frame.setExtendedState(JFrame.MAXIMIZED_BOTH); // show the frame frame.setVisible(true);
The following are 4 code examples of javax.swing.JFrame(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.
10 Μαρ 2018 · How to maximize (or minimize) a JFrame. As a quick note today, here’s some code that shows how to maximize a JFrame: MyJFrame myFrame = new MyJFrame(); // do other stuff here ... // this maximizes the jframe. myFrame.setState(Frame.NORMAL); // do whatever else you want to do ... myFrame.setVisible();
JFrame. Frames are top-level interfaces that pop up as windows and can be resized and closed. As containers, they typically contain panels and other components, for which they initiate layout management. They can also have an associated menubar and icons. Here's an example of how a simple frame works using JFrame. Import JFrame from javax.swing.