• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaFX - button with hyperlink to another page  RSS feed

 
Greenhorn
Posts: 2
Android Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Hayri Akyurtlu
Greenhorn
Posts: 2
Android Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 374
24
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I posted an answer to this question here: http://stackoverflow.com/questions/12531490/javafx-button-with-hyperlink-to-another-page
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!