# java swing link to new window

## Recommended Posts

Hi guys, I'm using eclipse window builder for simple swing windows that i am trying to create. i have everything laid out except the forgotten username and password links. does anyone know how i create a link(not a button) like a html link that would take the user to a new window when clicked? what swing component would i use to do this?

edit: i need the link to take me to a new window in the program and not a web browser

Edited by Darego

##### Share on other sites

a second question if anyone would be nice enough to answer

another one of my gui windows:

i need a section of the window to show all data from the Tickets table from my database.. is there a swing component that would let me show a table from my database?? (see "your open tickets" section of my window)

Edited by Darego

##### Share on other sites

** this question is SOLVED ** i used this line of code to set LaF

UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());


last questioin guys,my GUI look different from when i look at it with eclipse window builder to when i run it.. i guess it has something to do with the java "look and feel".  and how do i get it to keep the same characteristics when run as it has in the window builder. here is what it looks like when ran.. (want it to look like the window in my first above post if possible i.e. have the same button/label characteristics etc)

any help with any of the above questions will be greatly appreciated. thanks in advance

Edited by Darego

##### Share on other sites

P.S. I've not tested this code, so I don't know if it has errors or such

##### Share on other sites

thanks for the reply. looking at your link, i made some changes to my code to try set up the links although when i ran the code is made no changes at all and just gave me 2 normal buttons.. here is the code i used and a picture of it running

JButton btnForgottenUsername = new JButton("Forgotten Username?");


Edited by Darego

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628300
• Total Posts
2981894

• 9
• 9
• 11
• 10
• 10