Ok,
 
thanks for that info Jason, but I have gotten an error unfortunately.
 
The error is as follows :-
 
=================================================================
C:\Program Files\Xinox Software\JCreator LE\MyProjects\Assign1Project\File1.java:24: cannot resolve symbol
symbol  : method setPreferredSize  (java.awt.Dimension)
location: class java.awt.Button
 setbutton.setPreferredSize(new Dimension(50, 50));
                 ^
1 error
 
Process completed.
=================================================================
 
My code is as follows :-
 
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
 
public class File1 extends Frame implements ActionListener{
 
//button is a GUI component
 
 
 private Button setbutton;
 
 
 public File1() {
 
 //setLayout(new GridLayout(3,2));
 
 setbutton = new Button("SET");
 add(setbutton);
 setbutton.addActionListener(this);
 setbutton.setPreferredSize(new Dimension(50, 50));
 
 
 setSize(300,100);
 setTitle("Kitchen System");
 setVisible(true);
 
}//end of constructor
 
//---------------------------------------------------------------
//actionPerformed
//---------------------------------------------------------------
 
public void actionPerformed (ActionEvent e) {
 Button b = (Button)e.getSource();
 
 if (b == setbutton)
 {
    
 }//end of if
 
 
}//end of actionPerf
 
 
 public static void main(String [] args)
 {
 new File1(); 
  
 }
 
}//end of class
---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

Reply via email to