
| Arquivo: JavaH.java |
import javax.swing.*; public class JavaH extends JFrame { public JavaH() { super("Formulario"); Container ct = this.getContentPane(); MyBean p = new MyBean(); JLabel label_ = new JLabel(); label_.setText("<html>p.getProperty1() = "+p.getProperty1()+"<br>p.isProperty2() = "+p.isProperty2()+"</html>"); label_.setVerticalAlignment(JLabel.TOP); Image Icone = Toolkit.getDefaultToolkit().getImage("icon.gif"); this.setVisible(true); this.addWindowListener(new WindowAdapter() { } |
| Arquivo: MyBean.java |
import java.io.Serializable; private int property1; public MyBean() { } public void setProperty1(int property1) { public void setProperty2(boolean property2) { public int getProperty1() { public boolean isProperty2() { |

| Arquivo: JavaH.java |
import javax.swing.*; public class JavaH extends JFrame { private objeto p1; super("Formulario"); Container ct = this.getContentPane(); p1 = new objeto(); Image Icone = Toolkit.getDefaultToolkit().getImage("icon.gif"); this.setVisible(true); p1.botao1.addActionListener(new ActionListener() { p2.botao1.addActionListener(new ActionListener() { this.addWindowListener(new WindowAdapter() { } |
| Arquivo: objeto.java |
import javax.swing.*; import java.io.Serializable; public JLabel label1; public objeto() { public JPanel setTeste(int esquerda,int topo) { public void getTeste(){ |