The Artima Developer Community
Sponsored Link

Java Answers Forum
Resizing a window

3 replies on 1 page. Most recent reply: Sep 11, 2003 8:06 AM by Alexandre

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 3 replies on 1 page
Alexandre

Posts: 4
Nickname: aalleexx
Registered: Sep, 2003

Resizing a window Posted: Sep 11, 2003 7:03 AM
Reply to this message Reply
Advertisement
I have a window in which the components are gridbadlayout. When we choose an option in a combobox, a component is add to the window. It works... but the container of my frame isn't resized. How can we change the dimensions of a window after it has been already displayed ? I tried many things like this.setPreferedSize(new Dimension(500,500)), etc but nothing happens.

An idea ?


mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: Resizing a window Posted: Sep 11, 2003 7:48 AM
Reply to this message Reply
Did u tried

getTopLevelAncestor().setSize() for the component

mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: Resizing a window Posted: Sep 11, 2003 7:49 AM
Reply to this message Reply
erg check the argument of setSize() it takes dimension or int , int

Alexandre

Posts: 4
Nickname: aalleexx
Registered: Sep, 2003

Re: Resizing a window Posted: Sep 11, 2003 8:06 AM
Reply to this message Reply
Thanks a lot, it works now ;-)

Flat View: This topic has 3 replies on 1 page
Topic: Ann : Virtual Shopping Mall 1.3 - J2EE Resource for developers Previous Topic   Next Topic Topic: My program will not compile on a different pc

Sponsored Links



Google
  Web Artima.com   

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