1

Is there a way to let the textField of eclipse/swing this way?

enter image description here

Simulant
  • 19,190
  • 8
  • 63
  • 98
A. Sousa
  • 13
  • 1
  • 4

2 Answers2

0

You can add a matt look to the border of text field like this :

    JTextField textField = new JTextField();
// left side border        
    textField .setBorder(BorderFactory.createMatteBorder(0, 5, 0, 0, Color.BLACK));
//right side border
    textField.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 5, Color.BLACK));
PeaceIsPearl
  • 329
  • 2
  • 6
  • 19
0

If you need to customize only Inputfield, extends JTextInputField and Override the paint() method.

But probably you will need a full Look and Feel.

Community
  • 1
  • 1
fhofmann
  • 847
  • 7
  • 15