开发者

Which layout should I use to fill a JLayeredPane with JButtons in a order?

I want to fill the JLaye开发者_StackOverflow中文版redPane in a order so that when it reaches the right margin it should then start from the next line ans fill the entire box with buttons. I want to design a Point Of Sale screen and its hard for me to arrange the buttons manually.


If I understand correctly, you want the layout manager to auto wrap the components. Maybe the default behavior of the FlowLayout is enough for you.

Otherwise, it is actually fairly easy to develop your own layout manager by subclassing LayoutManager or LayoutManager2. Tip: see how other simple layout managers are implemented to judge the complexity of the task.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜