The Artima Developer Community
Sponsored Link

Java Answers Forum
Maximizing Internal Frames

1 reply on 1 page. Most recent reply: Jan 22, 2003 9:29 PM by James McConnell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
alex

Posts: 2
Nickname: methodmen
Registered: Jan, 2003

Maximizing Internal Frames Posted: Jan 21, 2003 8:09 PM
Reply to this message Reply
Advertisement
I have an interface which has a desktop in which an internal frame should show up when a menu event occurs.

the internalFrame is in a seperate class which extends JInternalFrame.

now when it is displayed it should me maximized, so i added setMaximized(true) in the intralFrame class

but it is maximized only when a split pane, which splits the desktopPane and another panel, when the split pane is resized.

when it is resized, the internal frame maximize but unless i resize it manually or by code, it stays small.

i don't have a big problem with moving the split pane a bit up in order for the internal frame to maximize, but is there no other way?

thank,s


James McConnell

Posts: 1
Nickname: jmccon
Registered: Jan, 2003

Re: Maximizing Internal Frames Posted: Jan 22, 2003 9:29 PM
Reply to this message Reply
Greetings,

I'm brand new to these forums, but I am doing a little work with some JInternalFrames myself, and I have a set-up very similar to yours. I am using a JDesktopPane with menus as my "MainWindowFrame". When a user click the File menu and selects New..., it opens an Internal Frame created by an instance of a separate class file that extends JInternalFrame. To get the JInternalFrame to open maximized, use this method immediately after construction:

try
{
frame.setSelected(true);
frame.setMaximum(true);
}
catch (java.beans.PropertyVetoException e) {}

This will open the Internal Frame in a maximized state. Hope I helped!

James

Flat View: This topic has 1 reply on 1 page
Topic: help with this preparedStatment Previous Topic   Next Topic Topic: Call a java methode from VB project?!?!!? Possible or not?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use