JTextField JPasswordField JFormattedTextField
JPasswordFieldでパスワードを可視化する
Section titled “JPasswordFieldでパスワードを可視化する”JPasswordFieldのエコー文字を変更
Section titled “JPasswordFieldのエコー文字を変更”JTextFieldにフォーカスがある場合の背景色を設定
Section titled “JTextFieldにフォーカスがある場合の背景色を設定”JTextFieldの背景色を半透明にする
Section titled “JTextFieldの背景色を半透明にする”JTextFieldにフォーカスと文字列が無い場合の表示
Section titled “JTextFieldにフォーカスと文字列が無い場合の表示”JTextFieldに透かし画像を表示する
Section titled “JTextFieldに透かし画像を表示する”DefaultEditorKitでポップアップメニューからコピー
Section titled “DefaultEditorKitでポップアップメニューからコピー”JTextFieldでコピー、貼り付けなどを禁止
Section titled “JTextFieldでコピー、貼り付けなどを禁止”JTextFieldのMarginを設定する
Section titled “JTextFieldのMarginを設定する”JTextField内のテキストをすべて選択
Section titled “JTextField内のテキストをすべて選択”JTextField内にアイコンを追加
Section titled “JTextField内にアイコンを追加”JComboBoxなどの幅をカラム数で指定
Section titled “JComboBoxなどの幅をカラム数で指定”JTextFieldの入力を数値に制限する
Section titled “JTextFieldの入力を数値に制限する”UndoManagerでJTextFieldのUndo、Redoを行う
Section titled “UndoManagerでJTextFieldのUndo、Redoを行う”DocumentFilterで先頭文字を大文字に変換する
Section titled “DocumentFilterで先頭文字を大文字に変換する”JTextFieldの角を丸める
Section titled “JTextFieldの角を丸める”Caretの点滅を停止する
Section titled “Caretの点滅を停止する”JPasswordFieldにヒント文字列を描画する
Section titled “JPasswordFieldにヒント文字列を描画する”JTextFieldでのBeep音の設定を変更する
Section titled “JTextFieldでのBeep音の設定を変更する”UndoManagerを使用した文字列選択ペーストの動作を変更する
Section titled “UndoManagerを使用した文字列選択ペーストの動作を変更する”JTextFieldを編集不可のJTextPaneに追加する
Section titled “JTextFieldを編集不可のJTextPaneに追加する”JTextPaneを一行に制限してスタイル可能なJTextFieldとして使用する
Section titled “JTextPaneを一行に制限してスタイル可能なJTextFieldとして使用する”JTextFieldの文字列に下線を付ける
Section titled “JTextFieldの文字列に下線を付ける”InputVerifierを設定したJTextFieldの値が不正な場合のフォーカス移動
Section titled “InputVerifierを設定したJTextFieldの値が不正な場合のフォーカス移動”JTextFieldの表示領域をJScrollBarでスクロールする
Section titled “JTextFieldの表示領域をJScrollBarでスクロールする”JTextAreaでハイライト付き検索を行う
Section titled “JTextAreaでハイライト付き検索を行う”InputVerifierを設定したコンポーネントのフォーカスナビゲーションをテストする
Section titled “InputVerifierを設定したコンポーネントのフォーカスナビゲーションをテストする”JSpinnerの文字列を非表示にする
Section titled “JSpinnerの文字列を非表示にする”JSpinnerで無効な値の入力を許可しない
Section titled “JSpinnerで無効な値の入力を許可しない”JSpinnerでLocalDateTimeを使用する
Section titled “JSpinnerでLocalDateTimeを使用する”
SpinnerLocalDateTimeModel
DateやCalendarなどを使用するSpinnerDateModelの代わりに、JDK8で導入されたLocalDateTimeなどを使用するSpinnerModelを作成して、JSpinnerで日付を選択します。
JFormattedTextFieldからフォーカスが失われた場合の処理を設定する
Section titled “JFormattedTextFieldからフォーカスが失われた場合の処理を設定する”JFormattedTextFieldにプレースホルダ文字列を追加したMaskFormatterを設定する
Section titled “JFormattedTextFieldにプレースホルダ文字列を追加したMaskFormatterを設定する”JTextFieldにActionListenerを追加する
Section titled “JTextFieldにActionListenerを追加する”JTextFieldのドラッグ&ドロップ設定をテストする
Section titled “JTextFieldのドラッグ&ドロップ設定をテストする”JPopupMenuを開く前に対象となるJTextFieldにFocusを移動する
Section titled “JPopupMenuを開く前に対象となるJTextFieldにFocusを移動する”JTableのセルエディタへの入力を検証する
Section titled “JTableのセルエディタへの入力を検証する”JPasswordFieldでCutとCopyを可能にする
Section titled “JPasswordFieldでCutとCopyを可能にする”JTextFieldがFocusを取得したらBorderの右上左辺を順に描画する
Section titled “JTextFieldがFocusを取得したらBorderの右上左辺を順に描画する”JTextFieldが編集不可状態でもCaretが点滅するよう設定する
Section titled “JTextFieldが編集不可状態でもCaretが点滅するよう設定する”JPasswordFieldでPINコード入力欄を作成する
Section titled “JPasswordFieldでPINコード入力欄を作成する”JTextFieldにタブ文字を挿入する
Section titled “JTextFieldにタブ文字を挿入する”JColorChooserのRGB色選択パネル内に表示される16進数カラーコードにAlpha値を追加する
Section titled “JColorChooserのRGB色選択パネル内に表示される16進数カラーコードにAlpha値を追加する”
ColorChooserRgbaHexCode
JColorChooserのRGB色選択パネル内に表示される16進数カラーコードをRGB6桁からAlpha値を追加したRGBA8桁に変更します。
JFormattedTextFieldに等幅フォントを設定する
Section titled “JFormattedTextFieldに等幅フォントを設定する”JTextFieldにフォーカスの有無でフチ色を変更するBorderを設定する
Section titled “JTextFieldにフォーカスの有無でフチ色を変更するBorderを設定する”JTextFieldでカーソルキーによる水平スクロールのスパンを変更する
Section titled “JTextFieldでカーソルキーによる水平スクロールのスパンを変更する”JSpinnerの数値を0.5単位で切り捨てる
Section titled “JSpinnerの数値を0.5単位で切り捨てる”JPasswordFieldの可視化で数字の色のみ変更する
Section titled “JPasswordFieldの可視化で数字の色のみ変更する”
DigitColoredPasswordField
JPasswordFieldに入力されたパスワードを可視化したとき、数値のみ色を変更して字形が似たアルファベットとの判別を簡単にします。