0 Replies Latest reply: Jan 31, 2009 3:42 AM by 843807 RSS


      i want to create a button called warehouse in a window called main such that when i click on it opens a new panel that has the following buttons addItem,check quantity. here is a sample of my main class. please help!

      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;
      public class InventorySoftware

      public static void main(String[]args)
           JFrame main= new JFrame();

           JPanel p1= new JPanel();
           JButton pos = new JButton("POINT OF SALE");
           JButton warhse = new JButton("WAREHOUSE");
           main.setTitle("INVENTORY CONTROL SYSTEM");
           pos.setBounds(new Rectangle(20,20,20,80));
           warhse.setBounds(new Rectangle(20,20,20,80));
           p1.setLayout(new FlowLayout());

      Edited by: andy2kibet on Jan 31, 2009 1:41 AM