This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I need to make a photo galley in java for my project. I need to have page numbers but I don't have any idea how to change the images after clicking a certain page. I made the page numbers in such a way that it will only add when the photos reach a certain number. The problem is that I don't know what to do to change the photos displayed in the gallery after clicking a certain page. Can you give me an idea on how to do it?
I stored the images in an array. Thanks in advance.
This a part of my code.
1. What's a page, in your terminology? Were you looking for JTabbedPane?
2. I see a setBounds(...) call in your code snippet, which leads me to believe that you need to learn about Layout Managers. If, of course this question relates to Swing at all.
And if it does relate to Swing, it's in the wrong place. I can move the thread (or not) once you confirm that.
There are no new questions, but there may be new answers.
Joined: Mar 27, 2012
1. I didn't know that there is a JTabbedPane. The page that I'm referring to is like the one the in webpages where there is like 1,2,3,etc. I already made that part.
2. I used a few layout managers in the past like gridbag layout but I think it is a bit late for me to change my code. This is related to swing.