Hi!

Does anybody know how to group JLabel and JTextField in order to get a single component?

Thanks!

Recommended Answers

  1. Create a new class that contains a label and a textfield and write the necessary constructor(s) and other methods.
  2. If you just want it for positioning etc, put them both in a JPanel
Jump to Post

All 2 Replies

1. Create a new class that contains a label and a textfield and write the necessary constructor(s) and other methods.
2. If you just want it for positioning etc, put them both in a JPanel

Ok, good ideas, thank you!