BorderFactory and JTextField & JTextArea

Hey everybody

I am making a JTextArea but it has no border so I want it to have the same border as the JTextField.

Does anybody know the name of that border? I found a similar one called Etched that works with the borderFactory

Thanks in advance

[270 byte] By [eddies1j2a] at [2007-11-27 10:28:15]
# 1

have you tried the etched border? just specify the type lowered or raised.

use lowered bevel.

take a look:

http://java.sun.com/docs/books/tutorial/uiswing/components/border.html

Yannixa at 2007-7-28 17:50:36 > top of Java-index,Desktop,Core GUI APIs...
# 2

hmm this is weird when I try the fist one it works but it is obviously not lowered but when i try the second one it says "cannot find symbol variable EtchedBorder" in the task view

tCalificacion is the JTextArea

tCalificacion.setBorder( BorderFactory.createEtchedBorder() );

tCalificacion.setBorder( BorderFactory.createEtchedBorder(EtchedBorder.LOWERED) );

Thanks

eddies1j2a at 2007-7-28 17:50:36 > top of Java-index,Desktop,Core GUI APIs...
# 3

import javax.swing.border.EtchedBorder;

or

import javax.swing.border.*;

Yannixa at 2007-7-28 17:50:36 > top of Java-index,Desktop,Core GUI APIs...
# 4

it finally works, thank you very much

eddies1j2a at 2007-7-28 17:50:36 > top of Java-index,Desktop,Core GUI APIs...
# 5

your welcome. ^_^

Yannixa at 2007-7-28 17:50:36 > top of Java-index,Desktop,Core GUI APIs...
# 6

> I am making a JTextArea but it has no border so I want it to have the same border as the JTextField.

textArea.setBorder( UIManager.get("TextField.border") );

camickra at 2007-7-28 17:50:36 > top of Java-index,Desktop,Core GUI APIs...