Αποτελέσματα Αναζήτησης
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 · this works perfectly till java 7. public class TEST { public static void main(String args[]) { JFrame jf= new JFrame(); jf.setVisible(true); jf.setExtendedState(JFrame.MAXIMIZED_BOTH); } }
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.
21 Μαρ 2024 · Platform-Specific Buttons: Depending on the operating system, JFrame windows feature minimize, maximize, and close buttons. Unlike an AWT Frame, the JFrame class is unique in its composition, as it houses a JRootPane as its only child.
6 Ιουλ 2019 · Maximize the frame window: frame.setExtendedState(JFrame.MAXIMIZED_BOTH); Set window location on screen: frame.setLocation(100, 100); Or: frame.setLocation(new java.awt.Point(100, 100)); Set size and location together: We can use the setBounds(x, y, width, height) method to set size and location of the frame in one call:
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();
A frame, implemented as an instance of the JFrame class, is a window that has decorations such as a border, a title, and supports button components that close or iconify the window. Applications with a GUI usually include at least one frame.