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


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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.