就象在vb中一样,可以吧几个组件按ctrl,点击,全选,一起移动。

解决方案 »

  1.   

    请参考JAVA核心技术一书(上中下三卷)的有关SWING的一卷,在SWING容器中有一个专门管理层次的类
      

  2.   

    期待解答我对SWING这一块不熟悉,因此有很多问题不能解决,请各位多多帮忙
      

  3.   

    layout manager
    JPanel 的default layout manager是Flowlayout
    In addition there exists BorderLayout, GridLayout and CardLayout
    You can set the manager just like below:
    JPanel myPanel = new JPanel();
    myPanel.setLayout(new BorderLayout());
    or:
    JPanel myPanel = new JPanel(new BorderLayout());
    I suggest you find a book about GUI to read.
    After that you'll find it's easy!
      

  4.   

    I'm sorry about my careless.
    Perhaps I distort the real meaning of your question.
      

  5.   

    谢谢sarsor(完美平台) 兄,不过我不是在问布局管理的事情啊
      

  6.   

    我想知道如果将布局管理设置为null,JPanel是如何管理其所属控件的层次的,为什么第一个加入窗体的控件总是在最外层?
      

  7.   

    找例子看看,jb带的在.java文件中jinit()里。
      

  8.   

    每个控件subComponent都可以被加入到Container类的控件c中,通过c.add(subComponent)方法。那么控组件subComponent就是属于控件c的。看一下Container类的方法介绍,你会明白很多。