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
# 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
# 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") );