• R/O
  • SSH

JdbcAcsess2: Commit

全てを再実装したJdbcAcsessです。


Commit MetaInfo

Revisione669d305514b3f18d65ef676e5c6fbc9bf28388a (tree)
Time2012-02-19 21:33:45
Authorshimakazuro
Commitershimakazuro

Log Message

historyでセル選択させる

Change Summary

Incremental Difference

diff -r bf564e37bd98 -r e669d305514b src/jdbcacsess2/main/JPanelHIstory.java
--- a/src/jdbcacsess2/main/JPanelHIstory.java Sun Feb 19 21:19:13 2012 +0900
+++ b/src/jdbcacsess2/main/JPanelHIstory.java Sun Feb 19 21:33:45 2012 +0900
@@ -24,32 +24,33 @@
2424 import javax.swing.ListSelectionModel;
2525
2626 public class JPanelHIstory extends JPanel {
27- private static final long serialVersionUID = -3133659235665481170L;
28-
29- private final JTable table;
30-
31- /**
32- * Create the panel.
33- */
34- public JPanelHIstory() {
35- setLayout(new BorderLayout(0, 0));
36-
37- JScrollPane scrollPane = new JScrollPane();
38- add(scrollPane, BorderLayout.CENTER);
27+ private static final long serialVersionUID = -3133659235665481170L;
3928
40- table = new JTable();
41-
42- table.setAutoCreateRowSorter(true);
43- table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
44- table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
45- scrollPane.setViewportView(table);
29+ private final JTable table;
4630
47- JToolBar toolBar = new JToolBar();
48- add(toolBar, BorderLayout.NORTH);
31+ /**
32+ * Create the panel.
33+ */
34+ public JPanelHIstory() {
35+ setLayout(new BorderLayout(0, 0));
4936
50- }
37+ JScrollPane scrollPane = new JScrollPane();
38+ add(scrollPane, BorderLayout.CENTER);
5139
52- public JTable getTable() {
53- return table;
54- }
40+ table = new JTable();
41+
42+ table.setAutoCreateRowSorter(true);
43+ table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
44+ table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
45+ table.setCellSelectionEnabled(true);
46+ scrollPane.setViewportView(table);
47+
48+ JToolBar toolBar = new JToolBar();
49+ add(toolBar, BorderLayout.NORTH);
50+
51+ }
52+
53+ public JTable getTable() {
54+ return table;
55+ }
5556 }
Show on old repository browser