This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 15299
    
    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 - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    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
GUI Qussion ~~~!
Question about expandable pull down list
How to expand JTextArea as main panel is resized
Expanding JPanels
multiline textfield