File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Adding a new page in a photo gallery in java help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Adding a new page in a photo gallery in java help" Watch "Adding a new page in a photo gallery in java help" New topic
Author

Adding a new page in a photo gallery in java help

Atsuko Maeda
Greenhorn

Joined: Mar 27, 2012
Posts: 6
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.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Atsuko Maeda
Greenhorn

Joined: Mar 27, 2012
Posts: 6
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.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

Atsuko Maeda wrote:The page that I'm referring to is like the one the in webpages where there is like 1,2,3,etc.

Haven't a clue what you're describing, but it appears you don't have a problem there, so I don't really need to understand. But then, what is your question? In the first post you wrote
I don't have any idea how to change the images after clicking a certain page.
That doesn't gel with your later statement
Atsuko Maeda wrote: I already made that part.


Atsuko Maeda wrote: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.

Now or when you trip over absolute positioning. Your choice.

Atsuko Maeda wrote:This is related to swing.

Thread moved from Beginning Java.
 
jQuery in Action, 2nd edition
 
subject: Adding a new page in a photo gallery in java help