jjzjj

BoxLayout

全部标签

java - 线程 "main"java.awt.AWTError : BoxLayout can't be shared 中的异常

我在这段代码上遇到了这个错误:super("TraceMasker");setLayout(newBoxLayout(getContentPane(),BoxLayout.PAGE_AXIS));label1=newJLabel("Sourcedirectory:");label2=newJLabel("Targetdirectory:");label3=newJLabel("Defectnumber:");label4=newJLabel("Slicetokens:");label4.setToolTipText("Seperatemultipletokenswithcomma");

java BoxLayout面板的对齐方式

我四处浏览,但没有找到专门适合我的情况的解决方案。我有一个显示在对话框中的面板://createdialogpanelJPanelpanel=newJPanel();panel.setLayout(newBoxLayout(panel,BoxLayout.Y_AXIS));panel.add(headerPanel);panel.add(type1Panel);panel.add(type2Panel);panel.add(type3Panel);panel.add(type4Panel);panel.add(type5Panel);panel.add(type6Panel);intr

java - 分配布局时出错 : BoxLayout can't be shared

我有这个JavaJFrame类,我想在其中使用boxlayout,但我收到一个错误提示java.awt.AWTError:BoxLayoutcan'tbeshared。我见过其他人有这个问题,但他们通过在内容Pane上创建boxlayout来解决它,但这就是我在这里所做的。这是我的代码:classEditDialogextendsJFrame{JTextFieldtitle=newJTextField();publiceditDialog(){setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);setTitle("Newentity");

java - 分配布局时出错 : BoxLayout can't be shared

我有这个JavaJFrame类,我想在其中使用boxlayout,但我收到一个错误提示java.awt.AWTError:BoxLayoutcan'tbeshared。我见过其他人有这个问题,但他们通过在内容Pane上创建boxlayout来解决它,但这就是我在这里所做的。这是我的代码:classEditDialogextendsJFrame{JTextFieldtitle=newJTextField();publiceditDialog(){setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);setTitle("Newentity");