File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes show dilog at bottom of the screen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "show dilog at bottom of the screen" Watch "show dilog at bottom of the screen" New topic
Author

show dilog at bottom of the screen

swapnel surade
Ranch Hand

Joined: Mar 05, 2009
Posts: 129
Hi All,

I want to show the JDialog at the bottom of the screen.
how I can achieve this

thanks
swapnil
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 288

use dialog.setLocation(width,height);


-Chiru
swapnel surade
Ranch Hand

Joined: Mar 05, 2009
Posts: 129
its for just width and height of the dialog. how could this work for position of the dialog
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 288

i just gave the name of the variables as height and width , if you see the method which i told is setLocation where it places the dialog to specified x and y position

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36508
    
  16
The setBounds method is an alternative.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2091
    
    7
its for just width and height of the dialog. how could this work for position of the dialog


If you know the size of the screen and the size of the dialog, then you use simple math to calculate where the location should be.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: show dilog at bottom of the screen
 
Similar Threads
HFSJ EL e.g. page 371
What kinds of items for menu bar?
MIDP: Location for Command buttons
JPopupMenu
what is this for: setLocationRelativeTo()