Results 1 to 3 of 3
  1. #1
    diab01ical is offline Member
    Join Date
    Jun 2008
    Posts
    1
    Rep Power
    0

    Exclamation How to make a JButton disappear?

    I have a JScrollPane and an arrayList of JButtons. When you click on a JButton, the JButton would disappear(only the click JButton). The class implements ActionListener(with ActionEvent ae. How do I make the JButton disappear. I tried doing JScrollPaneName.remove(ae.getSource())
    and
    if(ae.getSource() == ArrayListName.get(0))
    {
    ArrayListName.remove(0);
    }

  2. #2
    Zosden's Avatar
    Zosden is offline Senior Member
    Join Date
    Apr 2008
    Posts
    384
    Rep Power
    7

    Default

    please show us all your code
    My IP address is 127.0.0.1

  3. #3
    Funkymunk is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

Similar Threads

  1. Help with JButton
    By geoffreybarwise in forum New To Java
    Replies: 4
    Last Post: 05-21-2008, 11:48 AM
  2. results to code disappear too fast for DOS window
    By dubdubdub in forum New To Java
    Replies: 3
    Last Post: 12-29-2007, 06:07 PM
  3. Few action in one Jbutton
    By kubiasty in forum New To Java
    Replies: 0
    Last Post: 07-25-2007, 11:19 AM
  4. Problem with JButton
    By Marcus in forum AWT / Swing
    Replies: 1
    Last Post: 07-05-2007, 06:56 AM
  5. Mouse over JButton
    By sandor in forum AWT / Swing
    Replies: 1
    Last Post: 05-17-2007, 10:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •