Im trying to make a simple program.It just has a couple JButtons and JTextFields,
but its looks kinda odd, and I was wondering how to change their size.

Thanks In advance
Scheppy

Recommended Answers

to change JButton size:
ButtonName.setPreferredSize(new Dimension(buttonWidth, buttonHeight));

Jump to Post

All 2 Replies

to change JButton size:
ButtonName.setPreferredSize(new Dimension(buttonWidth, buttonHeight));

Thanks alot, code works perfect

Be a part of the DaniWeb community

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