Aide en Java SVP
Fermé
Loline
-
21 mars 2002 à 12:10
hub Messages postés 50 Date d'inscription jeudi 6 septembre 2001 Statut Membre Dernière intervention 2 avril 2002 - 21 mars 2002 à 15:26
hub Messages postés 50 Date d'inscription jeudi 6 septembre 2001 Statut Membre Dernière intervention 2 avril 2002 - 21 mars 2002 à 15:26
A voir également:
- Aide en Java SVP
- Waptrick java football - Télécharger - Jeux vidéo
- Jeux java itel football - Télécharger - Jeux vidéo
- Java apk - Télécharger - Langages
- Java décompiler - Télécharger - Langages
- Java runtime - Télécharger - Langages
4 réponses
hub
Messages postés
50
Date d'inscription
jeudi 6 septembre 2001
Statut
Membre
Dernière intervention
2 avril 2002
7
21 mars 2002 à 12:59
21 mars 2002 à 12:59
private void openMenuItemActionPerformed (ActionEvent evt) {
JInternalFrame frame = new JInternalFrame();
Container tainer = frame.getContentPane();
JTextArea ta = new JTextArea ("salut");
ta.setRows(10);
ta.setColumns(10);
ta.setFont(new Font("Serif",Font.PLAIN,18));*/
frame.setClosable(true);
frame.setResizable(true);
frame.setIconifiable(true);
tainer.add("center",ta);
ta.setVisible(true);
frame.setSize(200,200);
frame.setLocation(0,0);
frame.pack();
frame.show();
}
uboot
JInternalFrame frame = new JInternalFrame();
Container tainer = frame.getContentPane();
JTextArea ta = new JTextArea ("salut");
ta.setRows(10);
ta.setColumns(10);
ta.setFont(new Font("Serif",Font.PLAIN,18));*/
frame.setClosable(true);
frame.setResizable(true);
frame.setIconifiable(true);
tainer.add("center",ta);
ta.setVisible(true);
frame.setSize(200,200);
frame.setLocation(0,0);
frame.pack();
frame.show();
}
uboot
hub
Messages postés
50
Date d'inscription
jeudi 6 septembre 2001
Statut
Membre
Dernière intervention
2 avril 2002
7
21 mars 2002 à 13:25
21 mars 2002 à 13:25
import java.awt.event.*;
import java.awt.image.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.text.*;
public class Fenetre extends JFrame {
//Déclarations des variables
private JMenuBar jMenuBar1;
private JMenu fileMenu;
private JMenuItem openMenuItem;
private JSeparator jSeparator1;
private JMenuItem contourMenuItem;
private JSeparator jSeparator2;
private JMenuItem clockMenuItem;
private JSeparator jSeparator3;
private JMenuItem exitMenuItem;
//Constructeur de la class Fenetre
public Fenetre() {
initComponents();
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent evt) {
exitForm(evt);
}
}
);
pack();
}
//Cette méthode est appelée par le constructeur pour initialiser la fenêtre.
private void initComponents() {
//Déclaration des instances de classe pour créer le menu
jMenuBar1 = new JMenuBar();
fileMenu = new JMenu();
openMenuItem = new JMenuItem();
openMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
openMenuIsSelected();
}
}
);
jSeparator1 = new JSeparator();
contourMenuItem = new JMenuItem();
jSeparator2 = new JSeparator();
clockMenuItem = new JMenuItem();
jSeparator3 = new JSeparator();
exitMenuItem = new JMenuItem();
fileMenu.setText("Fichier");
openMenuItem.setText("Ouvrir");
fileMenu.add(openMenuItem);
fileMenu.add(jSeparator1);
exitMenuItem.setText("Fermer");
exitMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
exitMenuItemActionPerformed();
}
}
);
fileMenu.add(exitMenuItem);
jMenuBar1.add(fileMenu);
setJMenuBar(jMenuBar1);
}
private void exitMenuItemActionPerformed() {
System.exit(0);
}
private void openMenuIsSelected() {
JDialog frame = new JDialog();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent evt) {
exitForm(evt);
}
}
);
JPanel panel = new JPanel();
JTextArea ta = new JTextArea("salut");
Container tainer = frame.getContentPane();
ta.setRows(10);
ta.setColumns(10);
ta.setFont(new Font("Serif",Font.PLAIN,18));
panel.add(ta);
tainer.add(panel);
//ta.setVisible(true);
frame.setResizable(true);
frame.setSize(200,200);
frame.setLocation(0,0);
frame.show();
}
private void exitForm(WindowEvent evt) {
System.exit(0);
}
public static void main(String args[]) {
new Fenetre().show();
}
public void windowClosing(WindowEvent evt) {
System.exit(0);
}
public void windowOpened(WindowEvent evt) {
}
public void windowIconified(WindowEvent evt) {
}
public void windowDeiconified(WindowEvent evt) {
}
public void windowClosed(WindowEvent evt) {
System.exit(0);
}
public void windowActivated(WindowEvent evt) {
}
public void windowDeactivated(WindowEvent evt) {
}
}
uboot
import java.awt.image.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.text.*;
public class Fenetre extends JFrame {
//Déclarations des variables
private JMenuBar jMenuBar1;
private JMenu fileMenu;
private JMenuItem openMenuItem;
private JSeparator jSeparator1;
private JMenuItem contourMenuItem;
private JSeparator jSeparator2;
private JMenuItem clockMenuItem;
private JSeparator jSeparator3;
private JMenuItem exitMenuItem;
//Constructeur de la class Fenetre
public Fenetre() {
initComponents();
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent evt) {
exitForm(evt);
}
}
);
pack();
}
//Cette méthode est appelée par le constructeur pour initialiser la fenêtre.
private void initComponents() {
//Déclaration des instances de classe pour créer le menu
jMenuBar1 = new JMenuBar();
fileMenu = new JMenu();
openMenuItem = new JMenuItem();
openMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
openMenuIsSelected();
}
}
);
jSeparator1 = new JSeparator();
contourMenuItem = new JMenuItem();
jSeparator2 = new JSeparator();
clockMenuItem = new JMenuItem();
jSeparator3 = new JSeparator();
exitMenuItem = new JMenuItem();
fileMenu.setText("Fichier");
openMenuItem.setText("Ouvrir");
fileMenu.add(openMenuItem);
fileMenu.add(jSeparator1);
exitMenuItem.setText("Fermer");
exitMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
exitMenuItemActionPerformed();
}
}
);
fileMenu.add(exitMenuItem);
jMenuBar1.add(fileMenu);
setJMenuBar(jMenuBar1);
}
private void exitMenuItemActionPerformed() {
System.exit(0);
}
private void openMenuIsSelected() {
JDialog frame = new JDialog();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent evt) {
exitForm(evt);
}
}
);
JPanel panel = new JPanel();
JTextArea ta = new JTextArea("salut");
Container tainer = frame.getContentPane();
ta.setRows(10);
ta.setColumns(10);
ta.setFont(new Font("Serif",Font.PLAIN,18));
panel.add(ta);
tainer.add(panel);
//ta.setVisible(true);
frame.setResizable(true);
frame.setSize(200,200);
frame.setLocation(0,0);
frame.show();
}
private void exitForm(WindowEvent evt) {
System.exit(0);
}
public static void main(String args[]) {
new Fenetre().show();
}
public void windowClosing(WindowEvent evt) {
System.exit(0);
}
public void windowOpened(WindowEvent evt) {
}
public void windowIconified(WindowEvent evt) {
}
public void windowDeiconified(WindowEvent evt) {
}
public void windowClosed(WindowEvent evt) {
System.exit(0);
}
public void windowActivated(WindowEvent evt) {
}
public void windowDeactivated(WindowEvent evt) {
}
}
uboot
hub
Messages postés
50
Date d'inscription
jeudi 6 septembre 2001
Statut
Membre
Dernière intervention
2 avril 2002
7
21 mars 2002 à 13:53
21 mars 2002 à 13:53
voilà voilà
ça doit marcher maintenant
bonne chance
uboot
ça doit marcher maintenant
bonne chance
uboot
Ca marche
Mais je voulais que ma fenêtre s'ouvre à l'intérieur et que lorsqu'on la ferme, ça ne ferme que la fenêtre interne (comme dans Word).
Mais MERCI bcp
Loline
Mais je voulais que ma fenêtre s'ouvre à l'intérieur et que lorsqu'on la ferme, ça ne ferme que la fenêtre interne (comme dans Word).
Mais MERCI bcp
Loline
hub
Messages postés
50
Date d'inscription
jeudi 6 septembre 2001
Statut
Membre
Dernière intervention
2 avril 2002
7
21 mars 2002 à 15:26
21 mars 2002 à 15:26
oups!
sorry
hub
"Pas plus bas qu'au fond"
sorry
hub
"Pas plus bas qu'au fond"