Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
noone
Les choses commencent péniblement à prendre forme...
import javax.swing.*; import java.awt.*;
public class CMain_applet extends JApplet { public void init() { Container c = getContentPane();
BorderLayout bl = new BorderLayout();
c.setLayout(bl);
Canvas display = new Canvas(); c.add("Center", display);
Container cEast = new Container(); FlowLayout flEast = new FlowLayout(); cEast.setLayout(flEast); cEast.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); c.add("East", new JButton("East"));
Container cSouth = new Container(); FlowLayout flSouth = new FlowLayout(); cSouth.setLayout(flSouth); cSouth.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
c.add("South", new JButton("South"));
} }
Les choses commencent péniblement à prendre forme...
import javax.swing.*;
import java.awt.*;
public class CMain_applet extends JApplet {
public void init() {
Container c = getContentPane();
BorderLayout bl = new BorderLayout();
c.setLayout(bl);
Canvas display = new Canvas();
c.add("Center", display);
Container cEast = new Container();
FlowLayout flEast = new FlowLayout();
cEast.setLayout(flEast);
cEast.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
c.add("East", new JButton("East"));
Container cSouth = new Container();
FlowLayout flSouth = new FlowLayout();
cSouth.setLayout(flSouth);
cSouth.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
Les choses commencent péniblement à prendre forme...
import javax.swing.*; import java.awt.*;
public class CMain_applet extends JApplet { public void init() { Container c = getContentPane();
BorderLayout bl = new BorderLayout();
c.setLayout(bl);
Canvas display = new Canvas(); c.add("Center", display);
Container cEast = new Container(); FlowLayout flEast = new FlowLayout(); cEast.setLayout(flEast); cEast.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); c.add("East", new JButton("East"));
Container cSouth = new Container(); FlowLayout flSouth = new FlowLayout(); cSouth.setLayout(flSouth); cSouth.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
c.add("South", new JButton("South"));
} }
noone
Autre question
peut-on avec un FlowLayout empiler verticalement des composants ?
je pense à la méthode setComponentOrientation
Sinon je suis obligé d'utiliser un GridLayout ?
Merci
Autre question
peut-on avec un FlowLayout empiler verticalement des composants ?