Galera, tudo bem?
Gostaria de saber se posso utilizar componentes AWT dentro de um JFrame que faz parte da SWING?
ISTO é um código gerado automaticamente com Netbeans.
entenda que a dificuldade inexiste uma vez que é tudo java.
/*
* NewJFrame.java
*
* Created on 16 de Maio de 2006, 15:33
*/
package javaapplication3;
/**
*
* @author sombriks
*/
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jButton1 = new javax.swing.JButton();
button1 = new java.awt.Button();
getContentPane().setLayout(null);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jButton1.setText("jButton1");
getContentPane().add(jButton1);
jButton1.setBounds(10, 10, 75, 23);
button1.setLabel("button1");
getContentPane().add(button1);
button1.setBounds(90, 10, 57, 24);
pack();
}// </editor-fold>
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify
private java.awt.Button button1;
private javax.swing.JButton jButton1;
// End of variables declaration
}
Vejo que é possível. Obrigado a todos.