Hi, dirk
I have created a successfully helloworld.jar previously which i followed the exactly same sample you posted on June 5, 02 thanks for that
My problem:
For the following code, I can create a tt.jar successfully, and it works well, but if i enbale those codes followed by **********, although tt.jar can be created successfully, it doesn't work, an Message box " can't find main class, program will exit" will jump out after double clicking tt.jar.
It is just a part code of my project, because there are some printing method in the remining codes, so that i have to enabel these codes whcih followed by ******
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.event.*;
import java.io.*;
import java.lang.*;
import java.util.*;
//import java.awt.print.*;**********************
//import javax.print.*; ************************
//import javax.print.attribute.*;***************
public class tt extends javax.swing.JFrame {
public static void main (
String args[]) {
new tt().show ();
}
public tt() {
initComponents ();
pack ();
}
private void initComponents() {
Container f = getContentPane();
f.setLayout(new BorderLayout());
//attributes = new HashPrintRequestAttributeSet(); *****************
jMenuBar1 = new javax.swing.JMenuBar();
File = new javax.swing.JMenu("File");
JMenuItem pagesetup = new JMenuItem("Page Set Up");
JMenuItem print = new JMenuItem("Print");
File.add(pagesetup);
File.add(print);
jMenuBar1.add(File);
setJMenuBar(jMenuBar1);
JPanel setting = new JPanel();
setting.setLayout(new GridLayout(15,1));
setting.add(new JLabel("table edit"));
setting.add(new JLabel(""));
setting.add(new JLabel("width"));
width = new JTextField("90",4);
setting.add(width);
setting.add(new JLabel("height"));
height = new JTextField("60",4);
setting.add(height);
JButton change = new JButton("change");
setting.add(change);
f.add(setting,java.awt.BorderLayout.WEST);
f.setSize(400,300);
}
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenu File;
// private PrintRequestAttributeSet attributes; ****************
private JTextField width;
private JTextField height;
}
I am using JDK 1.4 now, there's no compiling error whatever these code were enabled or not.
I was troubled by the problem around one week, hope you can help me.
thanks a lot
dejie