I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone help? my script is below. thank you -
import java.awt.*; //import all java.awt
-
import java.awt.event.*; //import all java.awt.event
-
import java.util.*; //import all java.util
-
import javax.swing.*; //import all javax.swing
-
-
class Product //start Product superclass
-
{
-
-
-
-
-
public String[] ItemName; //item's name
-
public int[] ItemNumber; //items's unique product number
-
public int[] ItemQuantity; //item's quantity in stock
-
public double[] ItemPrice; //item's price per
-
-
public Product(String[] name, int[] number, int[] quantity, double[] price) //product constructor
-
{
-
ItemName = name; //set ItemName to name
-
ItemNumber = number; //set ItemNumber to number
-
ItemQuantity = quantity; //set ItemQuantity to quantity
-
ItemPrice = price; //set ItemPrice to price
-
} //end Product constructor
-
-
public Product SortedArray(Product InvPart2) //start Product method SortedArray
-
{
-
String[] name=new String[InvPart2.ItemName.length]; //new name for sorting array
-
int [] number = new int[InvPart2.ItemNumber.length]; //new number for sorting array
-
int[] quantity = new int[InvPart2.ItemQuantity.length]; //new quantity for sorting array
-
double [] price = new double [InvPart2.ItemPrice.length]; //new price for sorting array
-
name = (String[])InvPart2.ItemName.clone(); // place name in sorting array
-
Arrays.sort(name); //sort by name
-
for (int counter = 0; counter < name.length; counter++) //loop and counter for sorting array
-
{
-
for(int counter2=0;counter2<name.length;counter2++)
-
//loop and counter to match unsorted array and sorted one
-
{
-
if(name[counter].equals(InvPart2.ItemName[counter2]))
-
//if statement for when a match occurs
-
{
-
quantity[counter]=InvPart2.ItemQuantity[counter2];
-
//set quantity equal to sorted array quantity
-
price[counter]=InvPart2.ItemPrice[counter2];
-
//set price equal to sorted array price
-
number[counter]=InvPart2.ItemNumber[counter2];
-
//set number equal to sorted array number
-
break; //break for if statement
-
} //end if statement
-
-
} //end for loop counter2
-
-
} //end for loop counter
-
Product SortedProductArray = new Product (name, number, quantity, price);
-
//new sorted product array replace old product array
-
return SortedProductArray; //return new product array sorted
-
} //end Product method SortedArray
-
-
public double TotalInvWorth(int[] quantity, double[] price) //start Product method TotalInvWorth
-
{
-
double total=0.00F; //set double total = 0
-
for (int counter = 0; counter < quantity.length; counter++)
-
//loop and counter to multiply each quantity x price in array
-
{
-
double perprodworth=quantity[counter]*price[counter];
-
// multiply quantity x price per counter in array = perprodworth
-
total=total+perprodworth; //add perprodworth to total
-
}
-
return total; //return total in TotalInvWorth
-
} //end Product method TotalInvWorth
-
-
} //end Product superclass
-
-
class DVD extends Product //start DVD subclass of Product
-
{
-
public int[] NumberOfDisc; //new feature number of disc in movie
-
public DVD(String[] name, int[] number, int[] quantity, double[] price, int[] numdisc)
-
//dvd constructor
-
{
-
super(name, number, quantity, price); //variables from superclass Product
-
NumberOfDisc=numdisc; //new variable number of disc per dvd
-
} //end dvd constructor
-
-
public DVD SortedArray(DVD Inventory5) //start DVD method SortedArray
-
{
-
int [] numdisc = new int[Inventory5.NumberOfDisc.length]; //new number for sorting array
-
Product DVDProduct=new Product(Inventory5.ItemName,Inventory5.ItemNumber,
-
Inventory5.ItemQuantity,Inventory5.ItemPrice); //set DVDProduct equal to superclass array
-
Product SortedDVDProduct=super.SortedArray(DVDProduct);
-
for (int counter = 0; counter < SortedDVDProduct.ItemName.length; counter++) //loop and counter for sorting array
-
{
-
for(int counter2=0;counter2<Inventory5.ItemName.length;counter2++)
-
//loop and counter to match unsorted array and sorted one
-
{
-
if(SortedDVDProduct.ItemName[counter].equals(Inventory5.ItemName[counter2]))
-
//if statement for when a match occurs
-
{
-
numdisc[counter]=Inventory5.NumberOfDisc[counter2];
-
break; //break for if statement
-
} //end if statement
-
-
} //end counter2 loop
-
-
} //end counter loop
-
DVD SortedProductArray = new DVD(SortedDVDProduct.ItemName, SortedDVDProduct.ItemNumber,
-
SortedDVDProduct.ItemQuantity, SortedDVDProduct.ItemPrice,numdisc);
-
//set SortedProductArray equal to superclass array plus new feature
-
return SortedProductArray; //return sortedproductarray
-
} //end DVD method SortedArray
-
-
public double DVDRestock () //start DVD method DVDRestock
-
{
-
double totalInvworthbeforerestockingfee=super.TotalInvWorth(ItemQuantity, ItemPrice);
-
//set totalInvWorthBeforeRestockingFee to TotalInvWorth in superclass
-
double restockfee=0.00F; //set restock fee to 0
-
double totalinvworthwithrestockfee=0.00F; //set toatal worth after fee to 0
-
restockfee = 0.05F*totalInvworthbeforerestockingfee; //restock fee = 5% to invworth before fee
-
totalinvworthwithrestockfee=restockfee+totalInvworthbeforerestockingfee; //add 5% to original inv worth
-
return totalinvworthwithrestockfee; //return inv total with fee
-
} //end DVD method DVDRestock
-
-
} //end DVD subclass
-
-
public class Inventory5 extends JFrame implements ActionListener
-
{ // start class Inventory5
-
-
public Inventory5()
-
{ //start Inventory5 constructor
-
this.initialize(); //set initialize
-
} //end Inventory5 constructor
-
-
private JTextArea text = new JTextArea(); //initializing jtextarea
-
private JButton firstBtn; //initializing first Jbutton
-
private JButton prevBtn; //initializing previous Jbutton
-
private JButton nextBtn; //initializing next Jbutton
-
private JButton lastBtn; //initializing last Jbutton
-
private JButton logoBtn; //initializing logo Jbutton
-
private ImageIcon logo = new ImageIcon("logo.gif"); //initializing picture for logo Jbutton
-
private int buttonCounter; //initializing buttonCounter for place in array
-
-
public void initialize() //start initialize method
-
{
-
firstBtn=new JButton("First"); //set firstBtn to JButton First
-
prevBtn=new JButton("Previous"); //set prevBtn to JButton Previous
-
nextBtn=new JButton("Next"); //set nextBtn to JButton Next
-
lastBtn=new JButton("Last"); //set lastBtn to JButton Last
-
logoBtn = new JButton(logo); //set logoBtn to JButton logo
-
-
this.getContentPane().add(this.logoBtn); //add logoBtn to content pane
-
this.logoBtn.setBounds(0, 0, 75, 75); //set logoBtn's size
-
this.logoBtn.setBorderPainted(false); //turn border off for logoBtn
-
-
this.getContentPane().add(this.firstBtn); //add firstBtn to content pane
-
this.firstBtn.setBounds(40, 300, 100, 30); //set firstBtn's size
-
this.firstBtn.setActionCommand("FIRST"); //set action command for firstBtn to FIRST
-
this.firstBtn.addActionListener(this); //set action lisnter for firstBtn
-
-
this.getContentPane().add(this.prevBtn); //add prevBtn to content pane
-
this.prevBtn.setBounds(150, 300, 100, 30); //set prevBtn's size
-
this.prevBtn.setActionCommand("PREV"); //set action command for prevBtn to PREV
-
this.prevBtn.addActionListener(this); //set action lisnter for prevBtn
-
-
this.getContentPane().add(this.nextBtn); //add nextBtn to content pane
-
this.nextBtn.setBounds(260, 300, 100, 30); //set nextBtn's size
-
this.nextBtn.setActionCommand("NEXT"); //set action command for nextBtn to NEXT
-
this.nextBtn.addActionListener(this); //set action lisnter for nextBtn
-
-
this.getContentPane().add(this.lastBtn); //add lastBtn to content pane
-
this.lastBtn.setBounds(370, 300, 100, 30); //set lastBtn's size
-
this.lastBtn.setActionCommand("LAST"); //set action command for lastBtn to LAST
-
this.lastBtn.addActionListener(this); //set action lisnter for lastBtn
-
-
this.getContentPane().add(this.text,BorderLayout.CENTER); //add text to window
-
this.setSize(520, 400); //set frame size
-
this.setResizable(false); //set frame resizable
-
this.setVisible(true); //set frame visiable
-
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //add to properly close app
-
} //end initialize method
-
-
-
public static void main(String[] args) //start main method
-
{
-
-
Inventory5 part4=new Inventory5();
-
part4.processing(part4.buttonCounter);
-
//needed to call processing method
-
-
} //end main method
-
-
private void processing(int counter) //start processing method
-
{
-
//setting static data for variables in each array
-
String[] name = {"Star Trek", "Star Gate", "Fifth Element", "Armageddon", "Star Wars "};
-
int[] number = {1, 2, 4, 5, 7};
-
int[] quantity = {2, 5, 6, 3, 9};
-
double[] price = {(double) 15.99, (double) 16.99, (double) 11.99,
-
(double) 13.95, (double) 14.95};
-
int[] numDisks= {1,2,1,2,1};
-
StringBuffer output=new StringBuffer(""); //new stringbuffer for output
-
-
Product Inventory5 = new Product (name, number, quantity, price);
-
//needed to reslove Product constructor
-
-
output.append(String.format("\n\n\n\n\n\nBefore Restocking Fee, Inventory Is Worth A Total Of: $%.2f\n",
-
Inventory5.TotalInvWorth(Inventory5.ItemQuantity,Inventory5.ItemPrice)));
-
//output to string total worth of inventory before fee
-
-
DVD DVDSub = new DVD (name, number, quantity, price, numDisks);
-
//needed to reslove DVD constructor
-
-
DVD SortedDVD = DVDSub.SortedArray(DVDSub);
-
//needed to replace original arrays with sorted one with new feature
-
-
output.append(String.format("After Restocking Fee of 5 Percent," +
-
" Inventory Is Worth A Total Of: $%.2f\n\n",DVDSub.DVDRestock()));
-
//output to string total worth of inventory after fee
-
-
output.append(String.format("Inventory\n")); //output to string inventory list
-
output.append(String.format("DVD Name:\tProdID:\tStock:\tPrice:\tDVDDisc:\n")); //output to string headers
-
-
-
-
output.append(String.format("%s\t%d\t%d\t%.2f\t%d\t\n",SortedDVD.ItemName[counter], SortedDVD.ItemNumber[counter],
-
SortedDVD.ItemQuantity[counter],SortedDVD.ItemPrice[counter],SortedDVD.NumberOfDisc[counter]));
-
//out for array buttonCounter determines where in which line of array is outputed
-
-
-
this.text.setText(output.toString()); //output all text to String to place in GUI
-
-
} //end processing method
-
-
-
public void actionPerformed (ActionEvent event) //started actionperformed method
-
{
-
-
this.initialize(); //initialize window
-
-
if(((JButton)event.getSource()).getActionCommand().equals("FIRST")) //if statement for first button
-
{
-
this.buttonCounter=0; //set buttonCounter to 0
-
}
-
-
else if(((JButton)event.getSource()).getActionCommand().equals("PREV")) //if statement for prev button
-
{
-
if (this.buttonCounter > 0) //if statement for only if buttonCounter is greater than 0
-
this.buttonCounter=--this.buttonCounter; //-1 from buttonCounter
-
}
-
-
else if(((JButton)event.getSource()).getActionCommand().equals("NEXT")) //if statement for next button
-
{
-
if (this.buttonCounter < 4) //if statement for only if buttonCounter is less than 4
-
this.buttonCounter=++this.buttonCounter; //+1 to buttonCounter
-
}
-
-
else if(((JButton)event.getSource()).getActionCommand().equals("LAST"))
-
{
-
this.buttonCounter=4; //set buttonCounter to 4
-
}
-
-
this.processing(this.buttonCounter); //return buttonCounter to processing method
-
-
} //end actionperformed method
-
-
} // end class Inventory5
2 2855
Greetings,
I changed your topic title to avoid confusion: Java is not Javascript and Java
programs aren't scripts. I also added code tags for readability reasons.
I'm afraid that not many people are going to read that much code in order to
figure out where it would be possible to add code for some buttons for you.
Better show a small piece of code that's giving your some trouble and ask
a coherent question about it. Thanks.
kind regards,
Jos
I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone help? my script is below. thank you -
import java.awt.*; //import all java.awt
-
import java.awt.event.*; //import all java.awt.event
-
import java.util.*; //import all java.util
-
import javax.swing.*; //import all javax.swing
-
-
class Product //start Product superclass
-
{
-
-
-
-
-
public String[] ItemName; //item's name
-
public int[] ItemNumber; //items's unique product number
-
public int[] ItemQuantity; //item's quantity in stock
-
public double[] ItemPrice; //item's price per
-
-
public Product(String[] name, int[] number, int[] quantity, double[] price) //product constructor
-
{
-
ItemName = name; //set ItemName to name
-
ItemNumber = number; //set ItemNumber to number
-
ItemQuantity = quantity; //set ItemQuantity to quantity
-
ItemPrice = price; //set ItemPrice to price
-
} //end Product constructor
-
-
public Product SortedArray(Product InvPart2) //start Product method SortedArray
-
{
-
String[] name=new String[InvPart2.ItemName.length]; //new name for sorting array
-
int [] number = new int[InvPart2.ItemNumber.length]; //new number for sorting array
-
int[] quantity = new int[InvPart2.ItemQuantity.length]; //new quantity for sorting array
-
double [] price = new double [InvPart2.ItemPrice.length]; //new price for sorting array
-
name = (String[])InvPart2.ItemName.clone(); // place name in sorting array
-
Arrays.sort(name); //sort by name
-
for (int counter = 0; counter < name.length; counter++) //loop and counter for sorting array
-
{
-
for(int counter2=0;counter2<name.length;counter2++)
-
//loop and counter to match unsorted array and sorted one
-
{
-
if(name[counter].equals(InvPart2.ItemName[counter2]))
-
//if statement for when a match occurs
-
{
-
quantity[counter]=InvPart2.ItemQuantity[counter2];
-
//set quantity equal to sorted array quantity
-
price[counter]=InvPart2.ItemPrice[counter2];
-
//set price equal to sorted array price
-
number[counter]=InvPart2.ItemNumber[counter2];
-
//set number equal to sorted array number
-
break; //break for if statement
-
} //end if statement
-
-
} //end for loop counter2
-
-
} //end for loop counter
-
Product SortedProductArray = new Product (name, number, quantity, price);
-
//new sorted product array replace old product array
-
return SortedProductArray; //return new product array sorted
-
} //end Product method SortedArray
-
-
public double TotalInvWorth(int[] quantity, double[] price) //start Product method TotalInvWorth
-
{
-
double total=0.00F; //set double total = 0
-
for (int counter = 0; counter < quantity.length; counter++)
-
//loop and counter to multiply each quantity x price in array
-
{
-
double perprodworth=quantity[counter]*price[counter];
-
// multiply quantity x price per counter in array = perprodworth
-
total=total+perprodworth; //add perprodworth to total
-
}
-
return total; //return total in TotalInvWorth
-
} //end Product method TotalInvWorth
-
-
} //end Product superclass
-
-
class DVD extends Product //start DVD subclass of Product
-
{
-
public int[] NumberOfDisc; //new feature number of disc in movie
-
public DVD(String[] name, int[] number, int[] quantity, double[] price, int[] numdisc)
-
//dvd constructor
-
{
-
super(name, number, quantity, price); //variables from superclass Product
-
NumberOfDisc=numdisc; //new variable number of disc per dvd
-
} //end dvd constructor
-
-
public DVD SortedArray(DVD Inventory5) //start DVD method SortedArray
-
{
-
int [] numdisc = new int[Inventory5.NumberOfDisc.length]; //new number for sorting array
-
Product DVDProduct=new Product(Inventory5.ItemName,Inventory5.ItemNumber,
-
Inventory5.ItemQuantity,Inventory5.ItemPrice); //set DVDProduct equal to superclass array
-
Product SortedDVDProduct=super.SortedArray(DVDProduct);
-
for (int counter = 0; counter < SortedDVDProduct.ItemName.length; counter++) //loop and counter for sorting array
-
{
-
for(int counter2=0;counter2<Inventory5.ItemName.length;counter2++)
-
//loop and counter to match unsorted array and sorted one
-
{
-
if(SortedDVDProduct.ItemName[counter].equals(Inventory5.ItemName[counter2]))
-
//if statement for when a match occurs
-
{
-
numdisc[counter]=Inventory5.NumberOfDisc[counter2];
-
break; //break for if statement
-
} //end if statement
-
-
} //end counter2 loop
-
-
} //end counter loop
-
DVD SortedProductArray = new DVD(SortedDVDProduct.ItemName, SortedDVDProduct.ItemNumber,
-
SortedDVDProduct.ItemQuantity, SortedDVDProduct.ItemPrice,numdisc);
-
//set SortedProductArray equal to superclass array plus new feature
-
return SortedProductArray; //return sortedproductarray
-
} //end DVD method SortedArray
-
-
public double DVDRestock () //start DVD method DVDRestock
-
{
-
double totalInvworthbeforerestockingfee=super.TotalInvWorth(ItemQuantity, ItemPrice);
-
//set totalInvWorthBeforeRestockingFee to TotalInvWorth in superclass
-
double restockfee=0.00F; //set restock fee to 0
-
double totalinvworthwithrestockfee=0.00F; //set toatal worth after fee to 0
-
restockfee = 0.05F*totalInvworthbeforerestockingfee; //restock fee = 5% to invworth before fee
-
totalinvworthwithrestockfee=restockfee+totalInvworthbeforerestockingfee; //add 5% to original inv worth
-
return totalinvworthwithrestockfee; //return inv total with fee
-
} //end DVD method DVDRestock
-
-
} //end DVD subclass
-
-
public class Inventory5 extends JFrame implements ActionListener
-
{ // start class Inventory5
-
-
public Inventory5()
-
{ //start Inventory5 constructor
-
this.initialize(); //set initialize
-
} //end Inventory5 constructor
-
-
private JTextArea text = new JTextArea(); //initializing jtextarea
-
private JButton firstBtn; //initializing first Jbutton
-
private JButton prevBtn; //initializing previous Jbutton
-
private JButton nextBtn; //initializing next Jbutton
-
private JButton lastBtn; //initializing last Jbutton
-
private JButton logoBtn; //initializing logo Jbutton
-
private ImageIcon logo = new ImageIcon("logo.gif"); //initializing picture for logo Jbutton
-
private int buttonCounter; //initializing buttonCounter for place in array
-
-
public void initialize() //start initialize method
-
{
-
firstBtn=new JButton("First"); //set firstBtn to JButton First
-
prevBtn=new JButton("Previous"); //set prevBtn to JButton Previous
-
nextBtn=new JButton("Next"); //set nextBtn to JButton Next
-
lastBtn=new JButton("Last"); //set lastBtn to JButton Last
-
logoBtn = new JButton(logo); //set logoBtn to JButton logo
-
-
this.getContentPane().add(this.logoBtn); //add logoBtn to content pane
-
this.logoBtn.setBounds(0, 0, 75, 75); //set logoBtn's size
-
this.logoBtn.setBorderPainted(false); //turn border off for logoBtn
-
-
this.getContentPane().add(this.firstBtn); //add firstBtn to content pane
-
this.firstBtn.setBounds(40, 300, 100, 30); //set firstBtn's size
-
this.firstBtn.setActionCommand("FIRST"); //set action command for firstBtn to FIRST
-
this.firstBtn.addActionListener(this); //set action lisnter for firstBtn
-
-
this.getContentPane().add(this.prevBtn); //add prevBtn to content pane
-
this.prevBtn.setBounds(150, 300, 100, 30); //set prevBtn's size
-
this.prevBtn.setActionCommand("PREV"); //set action command for prevBtn to PREV
-
this.prevBtn.addActionListener(this); //set action lisnter for prevBtn
-
-
this.getContentPane().add(this.nextBtn); //add nextBtn to content pane
-
this.nextBtn.setBounds(260, 300, 100, 30); //set nextBtn's size
-
this.nextBtn.setActionCommand("NEXT"); //set action command for nextBtn to NEXT
-
this.nextBtn.addActionListener(this); //set action lisnter for nextBtn
-
-
this.getContentPane().add(this.lastBtn); //add lastBtn to content pane
-
this.lastBtn.setBounds(370, 300, 100, 30); //set lastBtn's size
-
this.lastBtn.setActionCommand("LAST"); //set action command for lastBtn to LAST
-
this.lastBtn.addActionListener(this); //set action lisnter for lastBtn
-
-
this.getContentPane().add(this.text,BorderLayout.CENTER); //add text to window
-
this.setSize(520, 400); //set frame size
-
this.setResizable(false); //set frame resizable
-
this.setVisible(true); //set frame visiable
-
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //add to properly close app
-
} //end initialize method
-
-
-
public static void main(String[] args) //start main method
-
{
-
-
Inventory5 part4=new Inventory5();
-
part4.processing(part4.buttonCounter);
-
//needed to call processing method
-
-
} //end main method
-
-
private void processing(int counter) //start processing method
-
{
-
//setting static data for variables in each array
-
String[] name = {"Star Trek", "Star Gate", "Fifth Element", "Armageddon", "Star Wars "};
-
int[] number = {1, 2, 4, 5, 7};
-
int[] quantity = {2, 5, 6, 3, 9};
-
double[] price = {(double) 15.99, (double) 16.99, (double) 11.99,
-
(double) 13.95, (double) 14.95};
-
int[] numDisks= {1,2,1,2,1};
-
StringBuffer output=new StringBuffer(""); //new stringbuffer for output
-
-
Product Inventory5 = new Product (name, number, quantity, price);
-
//needed to reslove Product constructor
-
-
output.append(String.format("\n\n\n\n\n\nBefore Restocking Fee, Inventory Is Worth A Total Of: $%.2f\n",
-
Inventory5.TotalInvWorth(Inventory5.ItemQuantity,Inventory5.ItemPrice)));
-
//output to string total worth of inventory before fee
-
-
DVD DVDSub = new DVD (name, number, quantity, price, numDisks);
-
//needed to reslove DVD constructor
-
-
DVD SortedDVD = DVDSub.SortedArray(DVDSub);
-
//needed to replace original arrays with sorted one with new feature
-
-
output.append(String.format("After Restocking Fee of 5 Percent," +
-
" Inventory Is Worth A Total Of: $%.2f\n\n",DVDSub.DVDRestock()));
-
//output to string total worth of inventory after fee
-
-
output.append(String.format("Inventory\n")); //output to string inventory list
-
output.append(String.format("DVD Name:\tProdID:\tStock:\tPrice:\tDVDDisc:\n")); //output to string headers
-
-
-
-
output.append(String.format("%s\t%d\t%d\t%.2f\t%d\t\n",SortedDVD.ItemName[counter], SortedDVD.ItemNumber[counter],
-
SortedDVD.ItemQuantity[counter],SortedDVD.ItemPrice[counter],SortedDVD.NumberOfDisc[counter]));
-
//out for array buttonCounter determines where in which line of array is outputed
-
-
-
this.text.setText(output.toString()); //output all text to String to place in GUI
-
-
} //end processing method
-
-
-
public void actionPerformed (ActionEvent event) //started actionperformed method
-
{
-
-
this.initialize(); //initialize window
-
-
if(((JButton)event.getSource()).getActionCommand().equals("FIRST")) //if statement for first button
-
{
-
this.buttonCounter=0; //set buttonCounter to 0
-
}
-
-
else if(((JButton)event.getSource()).getActionCommand().equals("PREV")) //if statement for prev button
-
{
-
if (this.buttonCounter > 0) //if statement for only if buttonCounter is greater than 0
-
this.buttonCounter=--this.buttonCounter; //-1 from buttonCounter
-
}
-
-
else if(((JButton)event.getSource()).getActionCommand().equals("NEXT")) //if statement for next button
-
{
-
if (this.buttonCounter < 4) //if statement for only if buttonCounter is less than 4
-
this.buttonCounter=++this.buttonCounter; //+1 to buttonCounter
-
}
-
-
else if(((JButton)event.getSource()).getActionCommand().equals("LAST"))
-
{
-
this.buttonCounter=4; //set buttonCounter to 4
-
}
-
-
this.processing(this.buttonCounter); //return buttonCounter to processing method
-
-
} //end actionperformed method
-
-
} // end class Inventory5
Did you write this code?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Martin |
last post by:
Hi All,
I am a relative newbie to Java / Applets, but am despirately after
some help !
I have got the following code, which is basically a listing with
button items along the sides, allowing...
|
by: David Van D |
last post by:
Hi there,
A few weeks until I begin my journey towards a degree in Computer
Science at Canterbury University in New Zealand,
Anyway the course tutors are going to be teaching us JAVA wth bluej...
|
by: Khan |
last post by:
hi,
i'm writing java code inside <body> tag of java script file. all the
java code is executing at frame startup. how can i call that java code
only when i click on a button.
I can call jscript...
|
by: south622 |
last post by:
I'm taking a beginning Java course and I'm stuck in week eight of a nine week course. If anyone could help me I would greatly appreciate it. This assignment was due yesterday and each day I go past...
|
by: helpwithcode |
last post by:
Hi people,
I am just learning java.I have been creating a project which involves JDBC Connectivity.I find that the statements,
String string_dob=text_dob.getText();
//Converting string to...
|
by: twin2003 |
last post by:
need help with inventory part 5 here is what I have to do
Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next...
|
by: pinkf24 |
last post by:
I cannot figure out how to add the following:
Modify the Inventory Program to include an Add button, a Delete button, and a Modify button on the GUI. These buttons should allow the user to perform...
|
by: xirowei |
last post by:
public class Result
{
private int countA = 0;
private int countB = 0;
private int statement;
private boolean statusA = false;
private boolean statusB = false;
private int arrayA = new...
|
by: yeshello54 |
last post by:
Hey guys i am pretty new to java swing and need some help. I am developing a simple color chooser program in swing. I have a color panel that is connected to three sliders. red green and blue. but...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |