JAVA Image Icon and JButton resizing problem
I am stuck on a JAVA problem again.
I want to figure out how to do a ImageIcon resize.
Here is my following code:
ImageIcon imageClickForMovies = new ImageIcon("clickForMovies1.GIF");
JButton buttonClickForMovies = new JButton(imageClickForMovies);
If anyone can explain to me how to resize the ImageIcon and the Jbutton, that would be great. By the way, I am a very simple-minded person. So, please explain instructions carefully, so that it is in an understandable manner for me.
Re: JAVA ImageIcon and JButton resizing problem -- please go easy on me. :)?
What type of layout are you using? The different layouts will effect how you resize these components.
Here is a really good tutorial on layouts that leads onto how to size swing components and set their position:
A Visual Guide to Layout Managers (The Java™ Tutorials > Creating a GUI with JFC/Swing > Laying Out Components Within a Container)
Here is a quick method you can try first:
JButton button = new JButton ("Click me");