o**d 发帖数: 11 | 1 When both the number of rows and the number of columns have
been set to non-zero values, the number of columns specified
is ignored. For example, if three rows and two columns have
been specified and nine components are added to the layout,
then they will be displayed as three rows of three columns.
Specifying the number of columns affects the layout only
when the number of rows is set to zero, just like the case
we are discussing about. |
|
W******c 发帖数: 23 | 2 151. How are the elements of a GridLayout organized?
The elements of a GridBad layout are of equal size and are
laid out using the squares of a grid.
152. What an I/O filter?
An I/O filter is an object that reads from one stream and
writes to another, usually altering the data in some way as
it is passed from one stream to another.
153. If an object is garbage collected, can it become
reachable again?
Once an object is garbage collected, it ceases to exist. It
can no longer become reachable aga |
|
h*****0 发帖数: 4889 | 3 最简单的:
总体一个BorderLayout,右边的JTextArea放到East,一个panel放到center
中间的panel再用BorderLayout,north是JEditorPanel,center是JTextArea,south是
JPanel
这个Jpanel再用flowlayout,放4个button,这样可能是一行,也可能是两行(有可能
第一行出现3个,第二行出现1个)。这里如果不满意,可以用GridLayout强行指定成2*
2
Run, |
|
c*******9 发帖数: 6411 | 4 I tried the following code, and looks like text.setText("test") caused
the "org.eclipse.swt.SWTException: Invalid thread access" error.
the UI here has text field, and a browser button, the browser button will
display JFileChooser to choose a file.
any idea how to get this work?
thanks.
testing code:
private void createContents(final Shell shell)
shell.setLayout(new GridLayout(3, false));
final Label lable = new Label(shell, SWT.READ_ONLY);
lable.setText("File Path");
... 阅读全帖 |
|
c*******9 发帖数: 6411 | 5 【 以下文字转载自 Java 讨论区 】
发信人: cplus2009 (in the woods (木老虎)), 信区: Java
标 题: update main UI from child thread issue
发信站: BBS 未名空间站 (Tue May 21 14:13:10 2013, 美东)
I tried the following code, and looks like text.setText("test") caused
the "org.eclipse.swt.SWTException: Invalid thread access" error.
the UI here has text field, and a browser button, the browser button will
display JFileChooser to choose a file.
any idea how to get this work?
thanks.
testing code:
private void createContents(final She... 阅读全帖 |
|