This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JInternalframe will not maximise on setMaximum(true)

 
Scott Buckham
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a JInternal frame and adding it to a desktopPane and adding the desktopPane to the JSplitterPane. I am getting java.lang.NullPointerException at javax.swing.DefaultDesktopManager.maximizeFrame(DefaultDesktopManager.java:90) where it is tryign to getParent().getBounds() on the internalframe. I have done some testing an the internalframe never gets assigned a parent (put it on a listener for minimize so that it was after construction to be shore).
Could anyone help me??? Thanks in advance
Here is a summary of the code:
navigatorFrame = new JInternalFrame("Task Bar", true, true, true, true);
navigatorFrame.addInternalFrameListener(new InternListener());
navigatorFrame.setSize(new Dimension(250,this.getSize().height - 110));
// Add the navigation bar to the navigator panel
navigatorFrame.getContentPane().add(navBar);
navigatorFrame.setResizable(false);
navigatorFrame.setVisible(true);
navigatorFrame.setFrameIcon(new ImageIcon(""));
// Create the display frame that displays the main contents
JDesktopPane desktopPane = new JDesktopPane();
navigatorFrame = (JInternalFrame) desktopPane.add(navigatorFrame);
// Create the split pane
JSplitPane splitPane = new JSplitPane();
splitPane.setBorder(new EmptyBorder(new Insets(0,0,0,0)));
splitPane.setDividerLocation(250);
splitPane.setOneTouchExpandable(true);
// Add the internal frames to the split pane
splitPane.add(JSplitPane.LEFT, desktopPane);
// Create the holder panel and add our Intenal frames to the holder
holderP = new JPanel();
holderP.setLayout(new GridLayout());
holderP.add(splitPane);
// Add the tool bar, status bar, holderP to the application shell
container.add(holderP, BorderLayout.CENTER);
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic