This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Expanding Screen horizontally Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Expanding Screen horizontally" Watch "Expanding Screen horizontally" New topic
Author

Expanding Screen horizontally

chandu sekhar
Greenhorn

Joined: Apr 22, 2004
Posts: 4
hai,

I want to expand my screen in horizontal direction ONLY. now when i click maximize button i shud expand in horizontally only not vertical....

can any body help me .....

Regards,
Chandu.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

The only way this might be possible is to implement WindowListener on your JFrame and then in the windowMaximized(WindowEvent w) method adjust the verticle of your JFrame to not change. The problem with this is you are going to see the JFrame maximize in both directions and then see the height change after that.


GenRocket - A Test Data Generation Platform
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

I just found out the JDK 1.5 has a method, setMaximizedBounds(..) that should allow you to do what you want. If you can use 1.5, you are all set.
chandu sekhar
Greenhorn

Joined: Apr 22, 2004
Posts: 4
Thanx a lot Gregg Bolinger ...

I got the solution ....

Regards,

Chandu.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Expanding Screen horizontally
 
Similar Threads
Expanding JPanels
GUI Qussion ~~~!
How to expand JTextArea as main panel is resized
multiline textfield
Question about expandable pull down list