Hello
I write small program and try to compile and got error message.
bash-2.03$ javac Mediator_Interface.java
Mediator_Interface.java:1: Package javax.swing not found in import.
import javax.swing.* ;
^
Mediator_Interface.java:5: Superclass JFrame of class Mediator_Interface not found.
public class Mediator_Interface extends JFrame {
^
Jus don?t understand what I did wrong. The code is given below:
import javax.swing.* ;
public class Mediator_Interface extends JFrame {
public static void main(String args[]) {
new Mediator_Interface();
}
public Mediator_Interface() {
super("Mediation Advisors"); // Frame with title
setDefaultCloseOperation( DISPOSE_ON_CLOSE );
JTabbedPane jtp = new JTabbedPane(JTabbedPane.LEFT);
getContentPane().add( jtp );
jtp.add( new JButton("Show Cases"), "Cases");
jtp.add( new JLabel("Show Cases"), "Cases");
jtp.add( new JLabel("Log Out"), "Log Out");
System.out.println("");
setSize( 800, 600 ); // initial width, height
setLocation( 150,100 );
setVisible( true ); // shows the window
}
}
I write small program and try to compile and got error message.
bash-2.03$ javac Mediator_Interface.java
Mediator_Interface.java:1: Package javax.swing not found in import.
import javax.swing.* ;
^
Mediator_Interface.java:5: Superclass JFrame of class Mediator_Interface not found.
public class Mediator_Interface extends JFrame {
^
Jus don?t understand what I did wrong. The code is given below:
import javax.swing.* ;
public class Mediator_Interface extends JFrame {
public static void main(String args[]) {
new Mediator_Interface();
}
public Mediator_Interface() {
super("Mediation Advisors"); // Frame with title
setDefaultCloseOperation( DISPOSE_ON_CLOSE );
JTabbedPane jtp = new JTabbedPane(JTabbedPane.LEFT);
getContentPane().add( jtp );
jtp.add( new JButton("Show Cases"), "Cases");
jtp.add( new JLabel("Show Cases"), "Cases");
jtp.add( new JLabel("Log Out"), "Log Out");
System.out.println("");
setSize( 800, 600 ); // initial width, height
setLocation( 150,100 );
setVisible( true ); // shows the window
}
}