Bean in BeanBox Problem

downset04

Erfahrenes Mitglied
Hallo

Ich habe ein Bean erzeugt mit dem ich einen int Wert an ein anderes Bean schicken kann und das mir dann in einem Panel mit einem Textfeld angezeigt werden soll. Das Bean der die Zahl ausgibt funktioniert mit dem EventMonitor nur wenn ich versuche die Zahl an das Bean (unten Code) zu schicken und im Textfeld auszugeben bekomm ich diese Fehlermeldung? Weiß nicht mehr weiter!

Danke


Code:
Warning: Can't find public property editor for property "UI".  Skipping.
Warning: Can't find public property editor for property "actionMap".  Skipping.
Warning: Can't find public property editor for property "border".  Skipping.
Warning: Can't find public property editor for property "componentPopupMenu".  S
kipping.
Warning: Can't find public property editor for property "inputVerifier".  Skippi
ng.
Warning: Can't find public property editor for property "maximumSize".  Skipping
.
Warning: Can't find public property editor for property "minimumSize".  Skipping
.
Warning: Can't find public property editor for property "nextFocusableComponent"
.  Skipping.
Warning: Can't find public property editor for property "preferredSize".  Skippi
ng.
Warning: Property "toolTipText" has null initial value.  Skipping.
Warning: Can't find public property editor for property "transferHandler".  Skip
ping.
Warning: Can't find public property editor for property "UI".  Skipping.
Warning: Can't find public property editor for property "actionMap".  Skipping.
Warning: Can't find public property editor for property "border".  Skipping.
Warning: Can't find public property editor for property "componentPopupMenu".  S
kipping.
Warning: Can't find public property editor for property "inputVerifier".  Skippi
ng.
Warning: Can't find public property editor for property "maximumSize".  Skipping
.
Warning: Can't find public property editor for property "minimumSize".  Skipping
.
Warning: Can't find public property editor for property "nextFocusableComponent"
.  Skipping.
Warning: Can't find public property editor for property "preferredSize".  Skippi
ng.
Warning: Property "toolTipText" has null initial value.  Skipping.
Warning: Can't find public property editor for property "transferHandler".  Skip
ping.
Could not create event adaptor.

Code:
import java.awt.Panel;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

import javax.swing.JTextArea;
import javax.swing.JTextField;

public class PrintInt extends Panel implements PropertyChangeListener{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JTextArea jTextArea = null;
	private JTextField jTextField = null;
    private Integer zahl;
	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public Integer getZahl() {
		return zahl;
	}

	public void setZahl(Integer zahl) {
		this.zahl = zahl;
	}

	public void setJTextArea(JTextArea textArea) {
		jTextArea = textArea;
	}

	public void setJTextField(JTextField textField) {
		jTextField = textField;
	}

	/**
	 * This is the default constructor
	 */
	public PrintInt() {
		zahl = new Integer(0);		
		initialize();
		jTextField.setText(zahl.toString());
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private  void initialize() {
		this.setLayout(null);
		this.setSize(136, 72);
		this.add(getJTextField(), null);
		this.add(getJTextArea(), null);
	}

	public void propertyChange(PropertyChangeEvent arg0) {
		zahl = (Integer) arg0.getNewValue();
		jTextField.setText(zahl.toString());		
	}

	/**
	 * This method initializes jTextArea	
	 * 	
	 * @return javax.swing.JTextArea	
	 */    
	private JTextArea getJTextArea() {
		if (jTextArea == null) {
			jTextArea = new JTextArea();
			jTextArea.setBounds(72, 7, 0, 16);
		}
		return jTextArea;
	}

	/**
	 * This method initializes jTextField	
	 * 	
	 * @return javax.swing.JTextField	
	 */    
	private JTextField getJTextField() {
		if (jTextField == null) {
			jTextField = new JTextField();
			jTextField.setBounds(17, 13, 94, 42);
		}
		return jTextField;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
 

Neue Beiträge

Zurück