How to Automatically display the button in center of the JScrollpane?
posted 12 years ago
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?