Package javax.swing

Examples of javax.swing.JLabel.addActionListener()


        // TODO: do this properly for the fractional values case...
        int nColumns = integerValues ? Math.max(nCharsForValue((int) lowerBound), nCharsForValue((int) upperBound)) : 4;
        label.setColumns(nColumns);

        label.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if (!ignoreChangeEvents) {
                        double newValue = Double.parseDouble(label.getText());
                        if (newValue >= lowerBound && newValue <= upperBound) {
                            changeValue(newValue);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.