• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Automatically display the button in center of the JScrollpane?

 
Sim Cray
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I make an JLabel and setIcon("back.gif") for it and add a Jbutton on the label at a specified point of the back.gif picture, then I new an JScrollPane with the label and add ScrollPane in JFrame.
Now I want to add a new JButton in the JFrame, when I press the new button, the button on the label will automatically be displayed in the
center of the JScrollpane(the location of the button on the label mustn't be changede). How to make it?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!