Property « Button « Java Swing Q&A





1. Im trying to use .getName on a JButton, but it returns null, but when i do the toString it returns me all the right properties?    stackoverflow.com

SOURCE: javax.swing.JButton[,571,647,80x80,alignmentX=0.0,alignmentY=0.5,border=com.apple.laf.AquaButtonBorder$Toggle@1380cf2a,flags=288,maximumSize=java.awt.Dimension[width=80,height=80],minimumSize=java.awt.Dimension[width=80,height=80],preferredSize=java.awt.Dimension[width=80,height=80],defaultIcon=file:/Users/andreaks/Desktop/PreEntregaiDomino/build/classes/imagenes/A23.png,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=0,left=2,bottom=0,right=2],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=,defaultCapable=true] NAME: null the code im using is

private void JBsetseleccionadActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    Object boton = evt.getSource();
    ...

3. Acces bean class property through a JButton    coderanch.com

I have tried to assign a value to a bean class property through a jTextfield and retrive it (Using netbeans). this is the bean class public class Bean { private Double d ; public Double getD() { return d; } public void setD(Double d) { this.d = d; } } this is the code that i have written inside the actionevent ...

4. Acces bean class property through a JButton    coderanch.com

I have tried to assign a value to a bean class property through a jTextfield and retrive it (Using netbeans). this is the bean class public class Bean { private Double d ; public Double getD() { return d; } public void setD(Double d) { this.d = d; } } this is the code that i have written inside the actionevent ...