aspose file tools*
The moose likes JavaFX and the fly likes JavaFX - button with hyperlink to another page 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 » JavaFX
Bookmark "JavaFX - button with hyperlink to another page" Watch "JavaFX - button with hyperlink to another page" New topic
Author

JavaFX - button with hyperlink to another page

Hayri Akyurtlu
Greenhorn

Joined: Sep 25, 2012
Posts: 2

Hello All,

I want to make an application in JavaFX-2 based on two pages as "main" page and "extras" page. In the main page, I have added a Hbox function which includes a button named "extras".

How do I define a second page and how can I set a hyperlink to the button (onMouseClicked event?), to refer to extras page?

I could not find any examples on Mouse events related to this question. Thanks for help!

note: extras page will not be a "pop-up". It should appear instead of the old page like when you click a link on a webpage.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

Hello Hayri, and welcome to the Ranch! Were you maybe looking for a Pagination Control? Or would a Titled Pane and Accordion combination suit your purpose better?

I can see you waited a few days and only posted here when you didn't get any responses on a another forum, but do please BeForthrightWhenCrossPostingToOtherSites <- link


luck, db
There are no new questions, but there may be new answers.
Hayri Akyurtlu
Greenhorn

Joined: Sep 25, 2012
Posts: 2

Thanks for the advice. Yes, I have posted a question in another forum, however there were no answers as you have indicated. Sorry for not reading forum rules.

I have checked Pagination and Titled Pane. I do not like to have tabs or numbers to refer to another page. I will create a button named extra; then when I press that button>> Stage, Scene will be changed that "extra" page uses. Then, if there's a button "BACK to homepage", it will direct to main page of my application.
Does not JavaFX have a simple hyperlink command like "Back" or "Forward" buttons that we use in Web Page Explorers?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

No, it doesn't. You will need to code it up yourself. What you describe resembles a simple, two-page wizard GUI. Searching the net for "JavaFX Wizard" produces some interesting results, one or more of which could be easily adapted to your purpose.
John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 157
    
    9
I posted an answer to this question here: http://stackoverflow.com/questions/12531490/javafx-button-with-hyperlink-to-another-page
 
Consider Paul's rocket mass heater.
 
subject: JavaFX - button with hyperlink to another page