icyisamu
March 14th, 2006, 10:23 AM
Tried to compile the following code using javac.
Compiled using Javac. Obtained Interface.class and Interface$1.class
How can I use Jar on the generated classes? Do I need to use a Manifest file to get it done? If so, how?
I tried to set it on Interface class but it isn't working.
(there are some empty codes in there, I plan to add them on later, after this problem is solved.)
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Interface extends JFrame implements ActionListener{
private static int height,width;
private JButton btnClick;
public Interface(){
btnClick = new JButton("Hello World");
getContentPane().add(btnClick);
}
public void actionPerformed( ActionEvent e) {
} // End actionPerformed
public static void main(String args[]){
Interface i = new Interface();
i.setSize(300,300);
i.setVisible(true);
i.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
} // End Main
} // End Class
Compiled using Javac. Obtained Interface.class and Interface$1.class
How can I use Jar on the generated classes? Do I need to use a Manifest file to get it done? If so, how?
I tried to set it on Interface class but it isn't working.
(there are some empty codes in there, I plan to add them on later, after this problem is solved.)
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Interface extends JFrame implements ActionListener{
private static int height,width;
private JButton btnClick;
public Interface(){
btnClick = new JButton("Hello World");
getContentPane().add(btnClick);
}
public void actionPerformed( ActionEvent e) {
} // End actionPerformed
public static void main(String args[]){
Interface i = new Interface();
i.setSize(300,300);
i.setVisible(true);
i.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
} // End Main
} // End Class