Goodeveningun JTextArea rétractable avec scrollpane
comment peut avoir un JTextArea comme dans NetBeans (voir la photo)
alt text http://img10.hostingpics.net/pics/968190Sans_titre.png
mon code du JTextArea:
JTextArea infoArea = new JTextArea(10,10);
infoArea.setLineWrap(true);
infoArea.setFont(police);
infoArea.setForeground(Color.YELLOW);
infoArea.setBackground(Color.BLACK);
infoArea.setEditable(false);
JScrollPane scroll = new JScrollPane(infoArea);
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scroll.setBorder(BorderFactory.createEmptyBorder(5, 0, 10, 0));
scroll.setPreferredSize(new Dimension(sousFrame.getWidth(),90));
scroll.setFont(new Font("Arial", Font.BOLD, 13));
scroll.setBorder(BorderFactory.createTitledBorder("Output"));
merci
Pourriez-vous s'il vous plaît essayer d'expliquer ce qui ne fonctionne pas exactement? –
@Peter Lang: cela fonctionne bien mais je veux juste le rendre dockable ou rétractable comme le panneau de sortie dans netbeans (voir l'image) – Eddinho