Maximize « JFrame « Java Swing Q&A





1. Java: Swing --> Maximize window    stackoverflow.com

I'm putting together a quick and dirty animation using swing. I would like the window to be maximized. How can I do that? Thanks in advance :)

2. Finding the restore bounds of a JFrame when it is in a maximized state    stackoverflow.com

When a JFrame is in a maximized state, the getBounds method returns bounds that match its current state. What I need is the "restore bounds" (that is, the size/location of what ...

3. Maximizing a JFrame on action?    stackoverflow.com

Does anyone know how to maximize a JFrame once a specfic action has occured? I'll post my code below, I'm a fiend for not commenting my code (I'll do it at ...

4. Both maximizing and preventing resizing on a JFrame?    stackoverflow.com

I am making a game, so I want the JFrame to start maximized, but I also don't want users resizing the game, as it would screw up the graphics. I am ...

5. How to maximize a the height of a JFrame?    stackoverflow.com

Windows doesn't support myFrame.setExtendedState(JFrame.MAXIMIZED_VERT);. So I tried to get the screen size and made the JFrames height as big as the screens height. But then it covers the Windows taskbar. Is there any ...

6. How to maximize a JFrame thru code?    stackoverflow.com

How to maximize a JFrame thru code?

7. Does JFrame.setExtendedState(MAXIMIZED_BOTH) work with undecorated frames?    stackoverflow.com

The following Swing code doesn't work correctly on my machine or my co-workers machines (all Windows XP & Java 6):

public class Test {
    public static void main(String[] args) ...

8. maximize a JFrame in a multi monitor setup    stackoverflow.com

My Swing application uses JFrames. When one of the JFrames is dragged to a second monitor and the maximize button is pressed, it maximizes itself to the size of the (smaller) ...

9. How to set a JFrame to be maximized    forums.netbeans.org

Hi. see method: setExtendedState public void setExtendedState(int state) Sets the state of this frame. The state is represented as a bitwise mask. NORMAL Indicates that no state bits are set. ICONIFIED MAXIMIZED_HORIZ MAXIMIZED_VERT MAXIMIZED_BOTH Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT. Note that if the state is not supported on a given platform, nothing will happen. The application may determine if a specific state ...





11. maximize JFrame when showing    coderanch.com

12. Maximizing JFrame    coderanch.com

What do you mean "it is really not maximized"? The only way I have ever made a Frame take up the whole screen is by doing a getScreenSize with Toolkit and then setBounds on the Frame using those dimensions... Can you be more specific with what you don't like about the results you get from this? -Nate

13. Maximize JFrame on run    coderanch.com

14. JFrame maximize not really maximized    coderanch.com

I have a JFrame that is setBounds(0, 0, screen.width, screen.height); So that it makes it "maximized" and even though it is the full size of the screen, it isn't truly Maximized. You can still click the maximize button and it will dock the window to the screen. Is there a way to do this on load? Could you envoke the Robot ...

15. How do you maximize on frame load?    coderanch.com

16. How to start a JFrame in maximized mode    coderanch.com





17. Help,Components inside my Frame would not be displayed until maximized.    coderanch.com

Greetings everyone, I have this application I developed ( the full version is in the IO section, under the topic, I need help with seeking to abitrary positions within a text file ) but the GUI of the application has this problem I don't seem to know how to resolve. This is it; when you run this application, an empty frame ...

18. Maximizing a Frame    coderanch.com

I'd like to create the effect that occurs when you click on the "Maximize" Button on Windows OS. (ie. the middle button in the top right corner) I can use Toolkit.getDefaultToolkit().getScreenSize(); and then resize the Window, but it's not the same. I've tried generating the event with the processEvent and dispatchEvent methods, but I can only get it to work for ...

19. Maximizing JFrame    coderanch.com

20. Maximizing the Jframe in Swings    coderanch.com

Hi All, My Frame Normal position is (640X480).I am using JDK 1.3.1 package. While maximizing the Jframe it takes bounds as (800 x 600), But the next frame is opening with ( 808 X 580 )bounds, Getting different bounds. Applying code, Getting parent frame's sizes is : frame.setSize(getWidth(),getHeight()); It doesn't takes the exact bounds of the parent frame, How can i ...

21. Maximizing a window in Java Swing    coderanch.com

22. Contents of JFrame not maximizing    coderanch.com

23. Maximize JFrame from code    coderanch.com

Hi there, I am new to the forum, so I apologize for any daft moments :) I searched for this topic and only got topic on disabling the maximize button, so here goes. I need to set my jFrame (which is also my main class) to maximize in startup. To set it to be the same size as the screen is ...

24. Maximizing a form (JFrame) by default when it opens    coderanch.com

I can't. The IDE won't let me edit the generated code. Which I think is stupid. I did find a work around: the generated code for the main is this: public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new TestFrame().setVisible(true); } }); } I replaced it with the following to actually set a reference variable for ...

25. How to Maximize the JFrame ?    java-forums.org

To maximize a JFrame you would call its setExtendedState method and pass in Frame.MAXIMIZED_BOTH as the parameter. But again it seems kind of a strange design to have 10 JFrames in an application when most applications only need and should have one. Likely you'll want instead to swap JPanel views via a CardLayout, and if you're not familiar with using this, ...

26. My ellipses on my JFrame disappear every time i try to maximize the window!!!!!!!!    java-forums.org

Hi I'm doing a project for school and my homework program is due tomorrow here's my code: Java Code: /** This class simulates a cannonball fired at an angle. */ public class Cannonball { /** Constructs a Cannonball @param ivel the initial velocity of the ball @param angle the angle at which the cannonball was launched (in degrees) */ public Cannonball(double ...

27. create jframe maximized and on top of everything    forums.oracle.com

I am trying to create a login screen for a custom application, and need the jframe to be on top of everything on the screen, even the menu bar at the top and bottom of the screen (developing this for Ubuntu Linux) Just curious if this is possible. I have come across anything for it yet. I have the jframe maximized, ...

28. starting jframe in maximized state    forums.oracle.com