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!
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);