The Artima Developer Community
Sponsored Link

Java Answers Forum
ongoing nightmare with internal frame

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Adam Bell

Posts: 2
Nickname: golom
Registered: Aug, 2006

ongoing nightmare with internal frame Posted: Aug 1, 2006 1:08 PM
Reply to this message Reply
Advertisement
Could some one please help me, its been driing me potty for months! I have wrote this source code and i think it should display a internalframe when th New MenuItem is clicked but there are a thew errors that i can not suss out. Also i woul apreciate it if you could tell me whether this code would indeed make a internal frame appear when the menuitem is clicked!

Its writen in Java swing

package framedemo;

import java.*;
import java.io.*;
import javax.swing.JFrame;
import javax.swing.JDesktopPane;
import javax.swing.JMenuBar;
import javax.swing.plaf.DimensionUIResource;
import javax.swing.JMenuItem;
import javax.swing.JMenu;

class Untitled1 {
private static JDesktopPane getDesktopPane;

public static void main(String[] args) {
Untitled1 untitled1 = new Untitled1();

JFrame f = new JFrame("well");
JDesktopPane desk = new JDesktopPane();

f.setSize(new DimensionUIResource(400, 400));

//comstruct the bloody thing
JMenuBar mb = new JMenuBar();
JMenu file = new JMenu("file");
JMenuItem New = new JMenuItem("New File");
JMneuItem Open = new JMenuItem("Open");
JMenuItem Save = new JMenuItem("Save");
JMenuItem SaveAs = new JMenuItem("Save As");
JmenuItem Exit = new JMenuItem("Exit"); //end of menu set up
Exit.addActionListner

file.add(New); //It sagests a colon where the . is placed
New.addActionListner(desk); {
actionperformed(ActionEvent e)(); { //Is e write it tells me to put a colon insted
if (New.equals(e.getActionComand()))
setVisable(If);
} show(If); {
if (New.equals(0))
quit();
}}





//make internalframe and be special
class untitled2 extends Untitled1
implements ActionListenerNew {

protected void creatIF() {
InternalFrame frame = new InternalFrame("power of the puff");
frame.setVisable(true);


frame.setSelected(true);
}
}


}

};


Your time would be greatfuly apreciated!

Topic: databse search using apache lucene Previous Topic   Next Topic Topic: java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use