Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 1st, 2006, 12:44 AM   #1
golom
Newbie
 
Join Date: Jul 2006
Posts: 3
Rep Power: 0 golom is on a distinguished road
error in my internalframe, why?

As far as i know this should display a internalframe when the menuitem doc is clicked but it comes up with a whole list of errors. when i correct them and run it they appear again could someone please tell me why and help me correct it! thanks

import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.JDesktopPane;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.event.ActionEvent;


public class frame {
private static String doc;

public static void main(String[] args) {

//create the frame
JFrame frame = new JFrame("FrameDemo");
UIManager.LookAndFeelInfo.setPreferredLookAbdFeel(frame.class);


frame.setVisible(true);

//set up esktoppane
JDesktopPane desk = new JDesktopPane();

//construct the menubar and to items
JMenuBar mb = new JMenuBar();
JMenu file = new JMenu("File");
JMenuItem New = new JMenuItem("New");

//Optional: What happens when the frame closes?
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

//Create components and put them in the frame.
frame.add(mb);
frame.add(file);
frame.add(New);
New.addActionListener(frame);

frame.setJMenuBar(mb);

// Size the frame.
frame.pack();

//6. Show it.
frame.setVisible(true);

}

public void actionperformed(ActionEvent e) {
if ("new".equals(e)) {
GetActtionComand();
}
show(fr);

{

}



// make a internal
protected void createFrame() { //illegal start of exspresion

InternalFrame fr = new JInternalFrame("doc");
JDesktopPane d = new JDesktopPane();
fr.setVisable(true);

fr.setSelected(true);

//quit operation
Quit(0);
System.exit(0);

};
}

/**
* GetActtionComand
*/
private void GetActtionComand() {
}
}
golom is offline   Reply With Quote
Old Aug 1st, 2006, 12:57 AM   #2
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 762
Rep Power: 3 Jimbo is on a distinguished road
1) use code tags
2) could you post the errors you are getting?
Jimbo is offline   Reply With Quote
Old Aug 1st, 2006, 1:10 AM   #3
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Why did you make a new thread? You could have just posted the problem in your older thread. I bet you don't even have a clue on what you wanna do. By looking at your un-tagged code, you have very bad programming skills in Java and have a lot of errors.

Your code contains a lot of typos and unheard of methods. Google to search for what you want, b/c it makes me angry just looking at your code. Peace
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Aug 1st, 2006, 1:43 AM   #4
AntiNinja
Hobbyist Programmer
 
AntiNinja's Avatar
 
Join Date: Jun 2006
Location: The States
Posts: 101
Rep Power: 3 AntiNinja is on a distinguished road
Send a message via AIM to AntiNinja Send a message via Yahoo to AntiNinja
Quote:
Originally Posted by golom
it comes up with a whole list of errors. when i correct them and run it they appear again
Then your not fixing them, post the errors.

Here try this.
__________________
Pain is just weakness leaving the body.
AntiNinja is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC