开发者

Displaying a UI after clicking a button

I want to create a new UI within another UI which should be displayed on clicking a button using Java Swing. What should开发者_如何学运维 I do?

In my program on clicking next button I need to display a new UI. How can I link the new ui to the already existing one?


Do you mean wizard like? You can place all your UIs in CardLayout and switch them. Or remove old and add new calling

container.revalidate();
container.repaint();


One approach is to make the second UI not visible from the start.

setVisible(false);

and when you click the button make it visible:

setVisible(true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜