A voir également:
- Mon programme ne fonctionne pas
- Programme demarrage windows 10 - Guide
- Cette action ne peut pas être réalisée car le fichier est ouvert dans un autre programme - Guide
- Désinstaller programme windows 10 - Guide
- Forcer la fermeture d'un programme - Guide
- Programme démarrage windows 10 - Guide
1 réponse
mon code suivant en java ne fonctionne pas "
import java.awt.Color;
import java.awt.Font;
import java.awt.Rectangle;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
@SuppressWarnings("unused")
public class Roussia extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JPanel jPanel = null;
private JLabel jLabel=null;
private JTextField jTextField = null;
private JPanel getJPanel(){
if(jPanel == null){
jLabel = new JLabel();
jLabel.setBounds(new Rectangle(24,33,39,23));
jLabel.setText("Code");
jPanel = new JPanel();
jPanel.setLayout(null);
jPanel.setBounds(new Rectangle(5,9,656,369));
jPanel.setBorder(BorderFactory.createTitledBorder(null,"dfddddd",TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION,new Font("Dialog",Font.BOLD,12),new Color(51,51,51)));
jPanel.add(jLabel,null);
jPanel.add(getJTextField(), null);
}
return jPanel;
}
private JTextField getJTextField(){
if(jTextField == null){
jTextField = new JTextField();
jTextField.setBounds(new Rectangle(169,29,160,25));
}
return jTextField;
}
public static void main(String[] args){
Roussia thisClass = new Roussia();
thisClass.setVisible(true);
}
public Roussia(){
super();
initiaze();
}
private void initiaze(){
this.setSize(689, 421);
this.setContentPane(getContentPane());
}
private JPanel getJContentPane(){
if(jContentPane == null){
jContentPane= new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJPanel(),null);
}
return jContentPane;
}
}
import java.awt.Color;
import java.awt.Font;
import java.awt.Rectangle;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
@SuppressWarnings("unused")
public class Roussia extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JPanel jPanel = null;
private JLabel jLabel=null;
private JTextField jTextField = null;
private JPanel getJPanel(){
if(jPanel == null){
jLabel = new JLabel();
jLabel.setBounds(new Rectangle(24,33,39,23));
jLabel.setText("Code");
jPanel = new JPanel();
jPanel.setLayout(null);
jPanel.setBounds(new Rectangle(5,9,656,369));
jPanel.setBorder(BorderFactory.createTitledBorder(null,"dfddddd",TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION,new Font("Dialog",Font.BOLD,12),new Color(51,51,51)));
jPanel.add(jLabel,null);
jPanel.add(getJTextField(), null);
}
return jPanel;
}
private JTextField getJTextField(){
if(jTextField == null){
jTextField = new JTextField();
jTextField.setBounds(new Rectangle(169,29,160,25));
}
return jTextField;
}
public static void main(String[] args){
Roussia thisClass = new Roussia();
thisClass.setVisible(true);
}
public Roussia(){
super();
initiaze();
}
private void initiaze(){
this.setSize(689, 421);
this.setContentPane(getContentPane());
}
private JPanel getJContentPane(){
if(jContentPane == null){
jContentPane= new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJPanel(),null);
}
return jContentPane;
}
}