File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes setting the size of 'JDialog' problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "setting the size of Watch "setting the size of New topic

setting the size of 'JDialog' problem

Vikas Kumar Sahu
Ranch Hand

Joined: Dec 02, 2003
Posts: 59
I m making jdialog,
I set its size, but it is not comming in my desired size
my code is -

public class ServiceRootInfoDialog extends NmDialog {
private JPanel serviceRootTableViewPanel = null;
private ControllerI nmMainFrame = null;
private NetworkElement ne = null;
public ServiceRootInfoDialog(JFrame frame, String title,
ControllerI nmMainFrame, NodeModelI node) throws HeadlessException {
super(frame, title, true);
this.nmMainFrame = nmMainFrame; = (NetworkElement)node;
public void initComponent(){
serviceRootTableViewPanel = new JPanel();
// serviceRootTableViewPanel.setSize(new Dimension(700, 700));
this.setSize(new Dimension(700, 700));
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

Just comment or remove pack line you have aftr setSize() code. Should work...
- Manish
I agree. Here's the link:
subject: setting the size of 'JDialog' problem
It's not a secret anymore!