JTableクラスはJava SEのバージョンが上がるたびに機能拡張されています。例えば,J2SE 5.0では印刷のサポート,不連続セルの選択などの機能拡張が行われています。 Java SE 6でも以下の2点の機能が拡張されました。 カラムのセルのソーティング カラムのセルの ...
翔泳社では、「独習」「徹底入門」「スラスラわかる」「絵で見てわかる」「一年生」などの人気シリーズをはじめ、言語や開発手法、最新技術を解説した書籍を多数手がけています。プロジェクトマネジメントやチームビルティングといった管理職向けの ...
今回は、表シートを表示する「テーブル」の基本について覚えましょう。 JTableのデータを管理するモデルクラスは、javax.swing.tableパッケージのTableModelというインターフェイスを実装したクラスとして用意します。標準で、DefaultTableModelという実装済みの ...
今週は簡単なパズルから始めてみましょう。 サンプルのソースコード Monologue.java ちょっと長いですが,全文を次に示します(インポート文は省略しています)。 public class Monologue { private JButton button; public Monologue() { JFrame frame = new JFrame("Monologue"); frame ...
Java Foundation Classes (JFC) offer a rich selection of components for building smart and interactive graphical user interfaces (GUIs). You can display tabular data using the javax.swing.JTable class.
今回は、表計算ソフトなどでおなじみのテーブルを作る「JTable」についてです。 では、表示された各項目(テーブルの「セル」と呼ばれるものです)の値を取り出したり、変更したりするにはどうすればよいのでしょうか。JTableに、そのためのメソッドなど ...
Swing is a cross-platform user-interface toolkit to build desktop applications with Java and is packaged with the Java SDK. Build a user interface with different look-and-feels for any platform ...
Q: How can I set the color (or font) on a specific cell (row, column) in a JTable? A: In order to set the color or font for a specific table cell you must create a custom TableCellRenderer. The ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する