Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
I'm a newbie to Java and I have a question regarding a program I am writing as a part of an asignment. I need to create a GUI to accept some input in two text fields, click on an "accept button" which calls a method store() to save that input into an array. I am having troubles with this store method and storing the input into the array. Can someone help with the code for the store method as it is driving me *crazy*. Thanks in advance. A data structure the array is created in Shop.java and Sales.java is the main program. The store method is at the bottom. //Shop.java
public class Sales extends JPanel implements ActionListener{ public Sales(){ purchase = new Shop[100][100]; add(new JLabel("Product Code : ")); public void actionPerformed(ActionEvent e){ public void store(){ //Problem coding this method }catch(Exception et){System.out.println("Help");}
Replies:
|
Sponsored Links
|