Page 1 of 2 12 LastLast
Results 1 to 20 of 21
Like Tree1Likes

Thread: Button events & handlers- kindly educate me

  1. #1
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Button events & handlers- kindly educate me

    *This was previously posted in another thread about JPanels but that part has been worked out. My apologies to the mods for the repost.

    I'm working on a paint palette of sorts here. The application primarily has two JPanels. The left one is the 'canvas' (an array of buttons) which I want to click to change their appearance. The right panel is the 'palette' (a short series of options that are each linked to a small icon). My goal is to click an option in the right panel then click on a button in the left panel to change it to the icon selected. I'm not sure if my terminology is the best- sorry for that.

    How can I get my code to call on artifactLabel.getIcon() and then have it set a button label from my gridPane to display the same image? I feel like I almost have it worked out, but something escapes me.

    Java Code:
    	
    import java.awt.*;
    import javax.swing.*;
    import java.lang.*;
    import java.awt.event.*;
      
    public class TryStuff2 extends JFrame //implements ActionListener
    {
      
       private JPanel outerPane = new JPanel();
       private JPanel gridPane = new JPanel();
       private JPanel optionsPane = new JPanel();
       private JButton tiles[][];
       private JLabel landLabel;
        private JLabel artifactLabel;
        private JComboBox landOptions;
        private JComboBox artifactOptions;
        //private JTextField status = new JTextField(12);
       private final static int ROWS = 29;
        private final static int COLS = 31;
         
        public TryStuff2(String title)
        {
           //set a title & min size for outer frame
           super(title);
            setMinimumSize(new Dimension(1000, 800));
               
            //setup combo box land
            String[] landNames =
            {"position1.png","position2.png","position3.png","position4.png","position5.png",
            "position6.png","position7.png","position8.png","position9.png","position10.png",
            "position11.png","position12.png","position13.png","position14.png","position15.png"};
              
            final Icon[] landIcons = {
               new ImageIcon(getClass().getResource(landNames[0])),
               new ImageIcon(getClass().getResource(landNames[1])),
               new ImageIcon(getClass().getResource(landNames[2])),
               new ImageIcon(getClass().getResource(landNames[3])),
               new ImageIcon(getClass().getResource(landNames[4])),
               new ImageIcon(getClass().getResource(landNames[5])),
               new ImageIcon(getClass().getResource(landNames[6])),
               new ImageIcon(getClass().getResource(landNames[7])),
               new ImageIcon(getClass().getResource(landNames[8])),
               new ImageIcon(getClass().getResource(landNames[9])),
               new ImageIcon(getClass().getResource(landNames[10])),
               new ImageIcon(getClass().getResource(landNames[11])),
               new ImageIcon(getClass().getResource(landNames[12])),
               new ImageIcon(getClass().getResource(landNames[13])),
               new ImageIcon(getClass().getResource(landNames[14]))};
                  
              //setup combo box artifact
              String[] artifactNames =
              {"ark.png", "sevenCities.png", "ankor.png", "atlantis.png", "templar.png", "confucius.png"};
             
              final Icon[] artifactIcons = {
                 new ImageIcon(getClass().getResource(artifactNames[0])),
                  new ImageIcon(getClass().getResource(artifactNames[1])),
                  new ImageIcon(getClass().getResource(artifactNames[2])),
                  new ImageIcon(getClass().getResource(artifactNames[3])),
                  new ImageIcon(getClass().getResource(artifactNames[4])),
                  new ImageIcon(getClass().getResource(artifactNames[5]))};
               
              //add components to panels
            tiles = new JButton[ROWS][COLS];
              buildButtons();
            landOptions = new JComboBox(landNames);
            landOptions.setMaximumRowCount(15);
               
              landOptions.addItemListener(
                 new ItemListener()
                  {
                     public void itemStateChanged(ItemEvent event)
                      {
                         if(event.getStateChange() == ItemEvent.SELECTED)
                             artifactLabel.setIcon(landIcons[
                                 landOptions.getSelectedIndex()]);
                      }
                  }
              );
               
              artifactOptions = new JComboBox(artifactNames);
              artifactOptions.setMaximumRowCount(6);
              artifactLabel = new JLabel(artifactIcons[0]);
              optionsPane.add(artifactLabel);
              artifactOptions.addItemListener(
                 new ItemListener()
                  {
                     public void itemStateChanged(ItemEvent event)
                      {
                         if(event.getStateChange() == ItemEvent.SELECTED)
                             artifactLabel.setIcon(artifactIcons[
                                 artifactOptions.getSelectedIndex()]);
                      }
                  }
              ); 
               
              optionsPane.add(new JButton("Mountain"));
              optionsPane.add(new JButton("Friendly Village"));
              optionsPane.add(new JButton("Barbarian Village"));
              optionsPane.add(new JButton("Landmark"));
              optionsPane.add(new JButton("Capitol"));
     
            //add panel layouts then panels
            gridPane.setLayout(new GridLayout(ROWS,COLS));
            optionsPane.setLayout(new GridLayout(7,1));
            outerPane.setLayout(new BorderLayout());
            getContentPane().add(outerPane);
              
            optionsPane.add(landOptions);
              optionsPane.add(artifactOptions);
              //optionsPane.add(status);
            //status.setEnabled(false);
            outerPane.add(gridPane, BorderLayout.CENTER);
            outerPane.add(optionsPane, BorderLayout.EAST);
     
              
            this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        }
          
        private void buildButtons()
        {
          for(int i=0;i<ROWS;i++)
           {
             for(int j=0;j<COLS;j++)
               {
                tiles[i][j] = new JButton();
                    tiles[i][j].addActionListener(handler);
                tiles[i][j].setSize(400,400);
                gridPane.add(tiles[i][j]);
             }
          }
        }
         ReportClick handler = new ReportClick();
     
        class ReportClick implements ActionListener
       {
             public void actionPerformed(ActionEvent event)
             {
                /*JButton btn = (JButton) event.getSource();
                String s = btn.getText();
                status.setText(s);*/   
             }
          }     
       public static void main(String[] args)
        {
           //make instance of frame object & display it
           TryStuff2 t = new TryStuff2("Place a title for the frame here");
           t.pack();
           t.setVisible(true);
        }
    }
    Also feel free to make any suggestions for cleaning up my code here. It seems that there may be a few ways to shorten the code that I'm unaware of. Thanks again for any and all help!
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    call on artifactLabel.getIcon()
    Where does the code try to call getIcon? I don't see it in the posted code.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    I haven't coded that yet. I think it needs to go in the line 137 block. Not sure how to create an individual reference to each button in the array (if that's even necessary). I'm trying some different things but here's where I'm at: (k is defined as "private int k = 0;" at line 24)
    Java Code:
    private void buildButtons()
        {
          for(int i=0;i<ROWS;i++)
           {
             for(int j=0;j<COLS;j++)
               {
    		      JLabel buttonLabel = new JLabel("" + k);
                tiles[i][j] = new JButton();
    				tiles[i][j].addActionListener(handler);
                tiles[i][j].setSize(400,400);
                gridPane.add(tiles[i][j]);
    				tiles[i][j].add(buttonLabel);
    				k++;
             }
          }
        }
    	 ReportClick handler = new ReportClick();
        //trying to solve the last part with grid buttons here
    	 class ReportClick implements ActionListener
        {
           public void actionPerformed(ActionEvent event)
           {
    		    setIcon(artifactLabel.getIcon());
    		    System.out.println("Button clicked");
              /*JButton btn = (JButton) event.getSource();
              String s = btn.getText();
              status.setText(s);*/	
           }
        }
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  4. #4
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    Once I have a way to reference a button(let's say, buttonName), I think I just need to do "buttonName.setIcon(artifactLabel.getIcon());" at line 23 above.

    What do you think?
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    way to reference a button
    When do you need the reference? It is passed in the action event to the button's listener.
    If you don't understand my response, don't ignore it, ask a question.

  6. #6
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    I'm not sure I understand the question you're asking. I notice that when I click a button in the grid, that my println statement from line 24 appears in the output. So the tiles[][] and the handler() seem to be playing nice. What I don't know is if my code knows the difference between me clicking on button 15 and button 92, if that makes sense.

    As long as there is a way to have the code ask "what was the last option selected in the optionsPane?" and then come back and say "that's the Icon to display on the next button click in the gridPane." that will satisfy what I would like to do.

    Are you saying that what I need to do next is pass an event to the button listener? The way it is now, I think I've done that with a generic event. Please excuse my ignorance.
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  7. #7
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    code knows the difference between me clicking on button 15 and button 92
    Yes, line 139 gets a reference to the clicked button. For testing, add a statement in the listener that sets the text of the button that was clicked.
    If you don't understand my response, don't ignore it, ask a question.

  8. #8
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    How would I do that? Am I missing another statement within my for loop? Do I need to do something with the event.getSource() call? When I print that call to the output flow it dumps so much data that it doesn't make sense to me. I think it begins with the x,y pixel coordinates for the button clicked. Thanks.
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  9. #9
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    How would I do that?
    The code on line 140 calls the button's getText method. Change it to call the button's setText method.
    If you don't understand my response, don't ignore it, ask a question.

  10. #10
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    I wish it did that. That was commented code where a sample button was created at line 139. With a single button it is not a problem for me to reference it. I don't know how to call the "event.getSource()" on an array of buttons since they exist within the method buildButtons().
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    What happened when you called setText as I suggested? Did the text appear in the button that was clicked?
    If you don't understand my response, don't ignore it, ask a question.

  12. #12
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    The trouble is that btn was never added to any JPanel. Those comments were just me playing with a separate idea. I meant to delete them.

    Sorry for the confusion. There is a better visualization of my application if you would like to search the forums under sizzlewump or "need help with jpanels".
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  13. #13
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    Did you uncomment the code on lines 139 to 141 and change the getText call to a setText call?
    Why do you think I am suggesting that you do that? It will show you something.
    If you don't understand my response, don't ignore it, ask a question.

  14. #14
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    I played with the actionPerformed() as you suggested, Norm. Thank you for being patient with me. I still cannot get the icons to display for each button in the gridPanel, however, the last button in the array behaves as I would like all of the buttons to behave. In other words, one button is perfect. I believe it's due to the way I have my objects created within a loop. Can anyone see the one line of code that I need to change here?:
    Java Code:
    /*Created by John Thrush 3/14/2016
       TryStuff2 is a video game supplement
    	that works as a drawing tool.
    */
    import java.awt.*;
    import javax.swing.*;
    import java.lang.*;
    import java.awt.event.*;
     
    public class TryStuff2 extends JFrame 
    {
     
       private JPanel outerPane = new JPanel();
       private JPanel gridPane = new JPanel();
       private JPanel optionsPane = new JPanel();
       private JButton tiles[][];
    	private int k = 0;
       private JLabel landLabel;
    	private JLabel artifactLabel;
       private JLabel buttonLabel;
    	private JComboBox landOptions;
    	private JComboBox artifactOptions;
       private final static int ROWS = 12;
    	private final static int COLS = 12;
    	private JButton mountain = new JButton("Mountain");
    	private JButton friendly = new JButton("Friendly Village");
       private JButton barbarian = new JButton("Barbarians");
    	private JButton landmark = new JButton("Landmark");
    	private JButton capitol = new JButton("Capitol");
    	
    	public TryStuff2(String title)
        {
           //set a title & min size for outer frame
           super(title);
            setMinimumSize(new Dimension(1000, 800));
    		  
            //setup combo box land
            String[] landNames =
            {"position1.png","position2.png","position3.png","position4.png","position5.png",
            "position6.png","position7.png","position8.png","position9.png","position10.png",
            "position11.png","position12.png","position13.png","position14.png","position15.png"};
             
            final Icon[] landIcons = {
    		    /* for(int i=0, i<15, i++)
    			  {
    			     new ImageIcon(getClass().getResource(landNames[i]));
    			  }
    		  }*/
               new ImageIcon(getClass().getResource(landNames[0])),
               new ImageIcon(getClass().getResource(landNames[1])),
               new ImageIcon(getClass().getResource(landNames[2])),
               new ImageIcon(getClass().getResource(landNames[3])),
               new ImageIcon(getClass().getResource(landNames[4])),
               new ImageIcon(getClass().getResource(landNames[5])),
               new ImageIcon(getClass().getResource(landNames[6])),
               new ImageIcon(getClass().getResource(landNames[7])),
               new ImageIcon(getClass().getResource(landNames[8])),
               new ImageIcon(getClass().getResource(landNames[9])),
               new ImageIcon(getClass().getResource(landNames[10])),
               new ImageIcon(getClass().getResource(landNames[11])),
               new ImageIcon(getClass().getResource(landNames[12])),
               new ImageIcon(getClass().getResource(landNames[13])),
               new ImageIcon(getClass().getResource(landNames[14]))};
    			  
    		  //setup combo box artifact
    		  String[] artifactNames =
    		  {"ark.png", "sevenCities.png", "ankor.png", "atlantis.png", "templar.png", "confucius.png"};
            
    		  final Icon[] artifactIcons = {
    		     new ImageIcon(getClass().getResource(artifactNames[0])),
    			  new ImageIcon(getClass().getResource(artifactNames[1])),
    			  new ImageIcon(getClass().getResource(artifactNames[2])),
    			  new ImageIcon(getClass().getResource(artifactNames[3])),
    			  new ImageIcon(getClass().getResource(artifactNames[4])),
    			  new ImageIcon(getClass().getResource(artifactNames[5]))};
    		  
    		  //add components to panels
            tiles = new JButton[ROWS][COLS];
            landOptions = new JComboBox(landNames);
            landOptions.setMaximumRowCount(15);
    		  
    		  landOptions.addItemListener(
    		     new ItemListener()
    			  {
    			     public void itemStateChanged(ItemEvent event)
    				  {
    				     if(event.getStateChange() == ItemEvent.SELECTED)
    					     artifactLabel.setIcon(landIcons[
    						     landOptions.getSelectedIndex()]);
    				  }
    			  }
    		  );
    		  //add more components to panels
    		  artifactOptions = new JComboBox(artifactNames);
    		  artifactOptions.setMaximumRowCount(6);
    		  artifactLabel = new JLabel(artifactIcons[0]);
    		  optionsPane.add(artifactLabel);
    		  
    		  artifactOptions.addItemListener(
    		     new ItemListener()
    			  {
    			     public void itemStateChanged(ItemEvent event)
    				  {
    				     if(event.getStateChange() == ItemEvent.SELECTED)
    					     artifactLabel.setIcon(artifactIcons[
    						     artifactOptions.getSelectedIndex()]);
    				  }
    			  }
    		  ); 
    		  
    		  mountain.addActionListener(new ActionListener()
            {
               public void actionPerformed(ActionEvent e)
               {
               // change the icon displayed when button is pressed
               artifactLabel.setIcon(new ImageIcon(getClass().getResource("Mountain.png")));
               }
            });
    		  
    		  friendly.addActionListener(new ActionListener()
            {
               public void actionPerformed(ActionEvent e)
               {
               // change the icon displayed when button is pressed
               artifactLabel.setIcon(new ImageIcon(getClass().getResource("Friendly Village.png")));
               }
            });	
    		  
    		  barbarian.addActionListener(new ActionListener()
            {
               public void actionPerformed(ActionEvent e)
               {
               // change the icon displayed when button is pressed
               artifactLabel.setIcon(new ImageIcon(getClass().getResource("Barbarians.png")));
               }
            });  	     
    		  
    		  capitol.addActionListener(new ActionListener()
            {
               public void actionPerformed(ActionEvent e)
               {
               // change the icon displayed when button is pressed
               artifactLabel.setIcon(new ImageIcon(getClass().getResource("Capitol.png")));
               }
            }); 
    		  
            landmark.addActionListener(new ActionListener()
            {
               public void actionPerformed(ActionEvent e)
               {
               // change the icon displayed when button is pressed
               artifactLabel.setIcon(new ImageIcon(getClass().getResource("Landmark.png")));
               }
            });
    		  //add components to option panel
    		  optionsPane.add(landOptions);
    		  optionsPane.add(artifactOptions);	  
    		  optionsPane.add(mountain);
    		  optionsPane.add(friendly);
    		  optionsPane.add(barbarian);
    		  optionsPane.add(landmark);
    		  optionsPane.add(capitol);
            //add panel layouts then panels
    		  buildButtons();
            gridPane.setLayout(new GridLayout(ROWS,COLS));
            optionsPane.setLayout(new GridLayout(8,1));
            outerPane.setLayout(new BorderLayout());
            getContentPane().add(outerPane);
            outerPane.add(gridPane, BorderLayout.CENTER);
            outerPane.add(optionsPane, BorderLayout.EAST);
            //make sure the panel closes with the window
            this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        }
        //create an array of buttons in the grid panel
        private void buildButtons()
        {
          for(int i=0;i<ROWS;i++)
           {
             for(int j=0;j<COLS;j++)
               {
                buttonLabel = new JLabel("" + k);
                tiles[i][j] = new JButton();
    				tiles[i][j].addActionListener(handler);
                tiles[i][j].setSize(400,400);           
    				tiles[i][j].add(buttonLabel);
    				buttonLabel.setIcon(artifactLabel.getIcon());
    				gridPane.add(tiles[i][j]);
    				k++;
             }
          }
        }
    	 ReportClick handler = new ReportClick();
        //trying to solve the last part with grid buttons here
    	 class ReportClick implements ActionListener
        {
           public void actionPerformed(ActionEvent event)
           {
    		    System.out.println("Button clicked");
    			 buttonLabel.setIcon(artifactLabel.getIcon());
    			 //event.getSource();
           }
        }     
       public static void main(String[] args)
        {
           //make instance of frame object & display it
           TryStuff2 t = new TryStuff2("Place a title for the frame here");
           t.pack();
           t.setVisible(true);
        }
    }
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  15. #15
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    You have not used the code from lines 139 to 141 in post#1. The new code doesn't do what I suggested. It has a hardcoded button reference vs getting the reference that is passed to the listener method in the action event object.
    Change the listener to use the code from post#1 by changing the code that calls getText to call setText instead.
    If you don't understand my response, don't ignore it, ask a question.

  16. #16
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    So when I changed my actionListener and run the program, any clicked tile on the gridPane will change the last button's label to 0. Subsequent clicks will increase the label by 1 each (and also in the output flow as per my println statement). I still fail to see the forest for the trees in this. Does there need to be some kind of for loop in my actionListener in order for another button label to change?

    Java Code:
     class ReportClick implements ActionListener
        {
           public void actionPerformed(ActionEvent event)
           {
    			 buttonLabel.setText("" + k);
    			 k++;
              System.out.println(clicks);
    			 clicks++;
           }
        }
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  17. #17
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    another button label to change?
    Which other button's label do you want to change?
    If you don't understand my response, don't ignore it, ask a question.

  18. #18
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    It's an array of buttons called tiles[i][j]. They are a 10x10 grid of buttons laid out on a JPanel called gridPane.
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  19. #19
    Sizzlewump's Avatar
    Sizzlewump is offline Member
    Join Date
    Oct 2010
    Location
    MI, USA
    Posts
    68
    Rep Power
    0

    Default Re: Button events & handlers- kindly educate me

    To be precise, I want to change each of them as they are clicked.
    "The secret to getting what you want is to reject everything that you don't want." -Wolbers

  20. #20
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: Button events & handlers- kindly educate me

    I want to change each of them as they are clicked.
    Ok, I explained what you needed to do for that to happen. From post#1 lines 137 to 142
    Java Code:
        public void actionPerformed(ActionEvent event)
             {
                /*JButton btn = (JButton) event.getSource();
                String s = btn.getText();
                status.setText(s);*/  
             }
    I suggested you uncomment the code and change the getText to setText and see what happened:
    Java Code:
        public void actionPerformed(ActionEvent event)
             {
                JButton btn = (JButton) event.getSource();  // get reference to clicked button
                btn.setText("XYZ");    // set the button's text
             }
    Try that.
    Sizzlewump likes this.
    If you don't understand my response, don't ignore it, ask a question.

Page 1 of 2 12 LastLast

Similar Threads

  1. Do events while button is pressed
    By garnaout in forum New To Java
    Replies: 2
    Last Post: 01-24-2012, 09:43 PM
  2. multiple event handlers
    By Bimz in forum New To Java
    Replies: 12
    Last Post: 09-24-2011, 08:36 AM
  3. Need Help With Button Events
    By adlb1300 in forum New To Java
    Replies: 5
    Last Post: 11-03-2007, 06:36 AM
  4. Help with Event Handlers
    By Daniel in forum AWT / Swing
    Replies: 2
    Last Post: 07-04-2007, 07:16 AM

Posting Permissions

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