JInternalFrame maximizing in Windows 7, I have a set size, why is this happening?

Posted on 2012-09-17
Last Modified: 2012-09-21
JInternalFrame maximizing automatically in Windows 7, I have a set size, why is this happening?

The user clicks a button and this Internal Frame is created and added to JFrame. For some reason in Windows 7 it maximizes automatically. I dont want this, I want the set size I entered and also disabled maximize.

Can anyone help me?

		try {
		catch (PropertyVetoException e) {
		setPreferredSize(new Dimension(649, 430));
		setMaximumSize(new Dimension(649, 430));
		setMinimumSize(new Dimension(649, 430));
		getContentPane().setLayout(new BorderLayout(0, 0));

Open in new window

Question by:mmedi005
    LVL 16

    Accepted Solution

    You'd maybe do well to have a look at what RG has to say, here :

    Handling JInternalFrame with reference to DesktopPane.

    Author Comment

    Referring to the article above, that is how I have it setup. Inside the DesktopPane it is maximizing automatically and ignoring all set properties.

    am I missing a set?

    Author Closing Comment

    Lead me to more research in right direction, but found solution on my own.

    LVL 16

    Expert Comment

    Good to hear you got it sorted. But when a question is over, EE normally expects a solution to be posted along with it, even if the original asker got the answer himself.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    Title # Comments Views Activity
    method argument as final 1 54
    sumDigits  challenge 7 40
    return in catch statement 1 32
    pairs challenge 5 29
    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now