Package fr.imag.adele.apam.tutorials.lights.devices

Examples of fr.imag.adele.apam.tutorials.lights.devices.SimpleButton


        buttonsColumn.removeAll();
        if (theButtons != null && theButtons.size()>0) {
            Iterator<SimpleButton> it=theButtons.iterator();
            while(it.hasNext()) {
                final SimpleButton btn= it.next();
                JPanel panel=new JPanel();
                panel.setBorder(BorderFactory.createTitledBorder(
                        btn.getName()+" in "+btn.getLocation()));
                JButton btnGUI = new JButton("Press !");
                btnGUI.setPreferredSize(new DimensionUIResource(180, 40));

                btnGUI.addActionListener(new ActionListener() {

                    public void actionPerformed(ActionEvent e) {
                        System.out.println("A button has been clicked : "+btn.getName());
                        btn.pressButton();
                    }
                });

                panel.add(btnGUI);
                buttonsColumn.add(panel);
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.tutorials.lights.devices.SimpleButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.