---
title: JFrame JDialog JWindow
tags: [JFrame, JDialog, JWindow]
description: JFrame、JDialog、JWindow関係の記事へのスクリーンショット付きリンク一覧
---
このページでは、`JFrame`、`JDialog`、`JWindow`などの`Window`関係のコンポーネントの使い方を集めて一覧にしています。

#contents

* JFrame JDialog JWindow [#JFrame]
** JFrameを常に前面に表示する [#AlwaysOnTop]
#swingdescription(Swing/AlwaysOnTop,JFrameを常に前面に表示する,JFrameが常に他のウィンドウよりも前面に表示されるように設定します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTHh-ILwOI/AAAAAAAAARU/SYnOw7As81Y/s200/AlwaysOnTop.png)

** JFrameのタイトルバーなどの装飾を独自のものにカスタマイズする [#CustomDecoratedFrame]
#swingdescription(Swing/CustomDecoratedFrame,JFrameのタイトルバーなどの装飾を独自のものにカスタマイズする,JFrameのタイトルバーなどを非表示にして独自に描画し、これに移動リサイズなどの機能も追加します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTKV1P7mYI/AAAAAAAAAV0/u4qjd-ItBYU/s200/CustomDecoratedFrame.png)

** JInternalFrameをJFrameとして表示する [#InternalFrameTitleBar]
#swingdescription(Swing/InternalFrameTitleBar,JInternalFrameをJFrameとして表示する,JFrameのタイトルバーなどを非表示にし、JInternalFrameのタイトルバーでこれらを代用します。,https://lh4.googleusercontent.com/_9Z4BYR88imo/TQTOo9LcVwI/AAAAAAAAAcs/fUEpKhXr_aI/s200/InternalFrameTitleBar.png)

** JWindowをマウスで移動 [#DragWindow]
#swingdescription(Swing/DragWindow,JWindowをマウスで移動,JWindowなどのタイトルバーのないフレームをマウスで移動します。,https://lh6.googleusercontent.com/_9Z4BYR88imo/TQTL8cG8F0I/AAAAAAAAAYY/vZfyqnyr6-I/s200/DragWindow.png)

** Windowのフルスクリーン化 [#FullScreen]
#swingdescription(Swing/FullScreen,Windowのフルスクリーン化,JDialogやJFrameなどを、フルスクリーン表示に切り替えます。,https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTNRUUD2xI/AAAAAAAAAag/G7fNPgecnss/s200/FullScreen.png)

** JFrameのアイコンを非表示 [#DisableDefaultIcon]
#swingdescription(Swing/DisableDefaultIcon,JFrameのアイコンを非表示,JFrameなどのタイトルバーにあるアイコンを非表示にします。,https://lh6.googleusercontent.com/_9Z4BYR88imo/TQTK49Ua_nI/AAAAAAAAAWs/Ipb_maWCOgY/s200/DisableDefaultIcon.png)

** JFrameの移動を同期 [#DockingFrames]
#swingdescription(Swing/DockingFrames,JFrameの移動を同期,JFrameを2つ並べて作成し、その位置関係を保ったまま移動できるようにします。,https://lh4.googleusercontent.com/_9Z4BYR88imo/TQTLtEL3M0I/AAAAAAAAAYA/9HmyXI1Uw0M/s200/DockingFrames.png)

** JFrameの複数作成と終了 [#CloseOperation]
#swingdescription(Swing/CloseOperation,JFrameの複数作成と終了,JFrameを複数作成し、これらをすべて閉じた時にアプリケーションを終了します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTJey1HvEI/AAAAAAAAAUc/KdbEeHP-Ij0/s200/CloseOperation.png)

** WindowAncestor(親ウィンドウ)の取得 [#WindowAncestor]
#swingdescription(Swing/WindowAncestor,WindowAncestor(親ウィンドウ)の取得,SwingUtilities.getWindowAncestor()などで、親ウィンドウを取得します。,https://lh4.googleusercontent.com/_9Z4BYR88imo/TQTWr-a0yaI/AAAAAAAAApo/Wm-nQMxDh4s/s200/WindowAncestor.png)

** JFrameのIconを変更 [#FrameIcon]
#swingdescription(Swing/FrameIcon,JFrameのIconを変更,JFrameのタイトルバー左に表示されているアイコンを別の画像に変更します。,https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTNO_p95yI/AAAAAAAAAac/gl0vOOoKH14/s200/FrameIcon.png)

* ↑10 ↓11 [#xae0c617]
#adsensebar

** JFrameの終了をキャンセル [#WindowClosing]
#swingdescription(Swing/WindowClosing,JFrameの終了をキャンセル,JFrameを閉じる前に、本当に終了してよいか、終了をキャンセルするかなどを確認するダイアログを表示します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTWuSq18TI/AAAAAAAAAps/aCkiOWRqfDE/s200/WindowClosing.png)

** Windowを開いたときのフォーカスを指定 [#DefaultFocus]
#swingdescription(Swing/DefaultFocus,Windowを開いたときのフォーカスを指定,JFrameやJDialogなどのWindowを開いたときに、デフォルトでフォーカスを持つコンポーネントを指定します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTKp09XXEI/AAAAAAAAAWU/p3YhSijyS90/s200/DefaultFocus.png)

** JFrameのサイズを固定 [#FixedSizeFrame]
#swingdescription(Swing/FixedSizeFrame,JFrameのサイズを固定,JFrameやJDialogのサイズを固定し、変更不可にします。,https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTM4ZlDyXI/AAAAAAAAAZ4/xXHwfOJP7p0/s200/FixedSizeFrame.png)

** JDialogをESCキーで閉じる [#InputMap]
#swingdescription(Swing/InputMap,JDialogをESCキーで閉じる,ESCキーを押すと閉じるJDialogを作成します。,https://lh6.googleusercontent.com/_9Z4BYR88imo/TQTOj22ObUI/AAAAAAAAAck/b5izKCmGkHk/s200/InputMap.png)

** JFrameをスクリーン中央に表示 [#CenterFrame]
#swingdescription(Swing/CenterFrame,JFrameをスクリーン中央に表示,JFrameやJDialogなどのWindowが現在のスクリーン中央に配置されるように設定します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTIvEn-69I/AAAAAAAAATQ/Fw4dLY4C0EE/s200/CenterFrame.png)

** JFrameの縦横比を一定にする [#ConstrainedProportions]
#swingdescription(Swing/ConstrainedProportions,JFrameの縦横比を一定にする,JFrameの幅と高さの比率が一定になるように制限します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTKJeWlAAI/AAAAAAAAAVg/GMclfo0TYBM/s200/ConstrainedProportions.png)

** DynamicLayoutでレイアウトの動的評価 [#DynamicLayout]
#swingdescription(Swing/DynamicLayout,DynamicLayoutでレイアウトの動的評価,ウィンドウのリサイズなどに応じてレイアウトを再評価するように、DynamicLayoutを設定します。,https://lh3.googleusercontent.com/_9Z4BYR88imo/TQTMDyaDeJI/AAAAAAAAAYk/-EIAq3TyJbw/s200/DynamicLayout.png)

** JFrameの最小サイズ [#MinimumFrame]
#swingdescription(Swing/MinimumFrame,JFrameの最小サイズ,フレームやダイアログの最小サイズを指定します。,https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTP41PdCsI/AAAAAAAAAes/cxniHSm55rQ/s200/MinimumFrame.png)

** JWindowを使ったSplash Screenの表示 [#SplashScreen]
#swingdescription(Swing/SplashScreen,JWindowを使ったSplash Screenの表示,JWindowを使って、スプラッシュ・スクリーンを表示します。,https://lh6.googleusercontent.com/_9Z4BYR88imo/TQTTtxuiuuI/AAAAAAAAAk4/JhuyuS80C4M/s200/SplashScreen.png)

** JDialogでモーダルなJProgressBar付きSplash Screenを表示する [#ProgressSplashScreen]
#swingdescription(Swing/ProgressSplashScreen,JDialogでモーダルなJProgressBar付きSplash Screenを表示する,JDialogでモーダルなJProgressBar付きSplash Screenを表示します。,https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTRSxG9iaI/AAAAAAAAAg8/Wpd3hycacS4/s200/ProgressSplashScreen.png)

* ↑20 ↓21 [#x0e7f215]
#adsensebar

** JFrameを半透明化 [#WindowOpacity]
#swingdescription(Swing/WindowOpacity,JFrameを半透明化,JFrameのタイトルや子コンポーネントを除く背景が半透明になるよう設定します。,https://lh5.googleusercontent.com/_9Z4BYR88imo/TQTWw2d9LNI/AAAAAAAAApw/NXG2EcaSv_s/s200/WindowOpacity.png)

** JFrameの透明化と再描画 [#TranslucentFrameRepaint]
#swingdescription(Swing/TranslucentFrameRepaint,JFrameの透明化と再描画,透明にしたJFrameに半透明のデジタル時計を配置し、文字更新による背景色の再描画をテストします。,https://lh4.googleusercontent.com/-ujoDf8eD4vE/TqLcC0f2CHI/AAAAAAAABD4/LHaXXW6HW1k/s200/TranslucentFrameRepaint.png)

** Windowの形を変更 [#WindowShape]
#swingdescription(Swing/WindowShape,Windowの形を変更,JFrameのタイトルバーなどを非表示にし、Windowの形を非矩形図形に変更します。,https://lh4.googleusercontent.com/-f54GogC4jCU/Tu7AbPCJhsI/AAAAAAAABGc/EzG0Tf9ITFI/s200/WindowShape.png)

** JFrameの位置・サイズを記憶する [#Preferences]
#swingdescription(Swing/Preferences,JFrameの位置・サイズを記憶する,Preferences(レジストリなど)に、フレーム(パネル)のサイズ、位置を記憶します。,https://lh4.googleusercontent.com/_9Z4BYR88imo/TQTRGT4S7mI/AAAAAAAAAgo/GDUrxdRJ4x4/s200/Preferences.png)

** PersistenceServiceを使ってJFrameの位置・サイズを記憶 [#PersistenceService]
#swingdescription(Swing/PersistenceService,PersistenceServiceを使ってJFrameの位置・サイズを記憶,ServiceManagerからPersistenceServiceを取得し、JFrameなどの位置・サイズの保存、呼び出しを行います。,https://lh6.googleusercontent.com/-PyOW5DW5kHU/T3APD_Cq_bI/AAAAAAAABKk/i9eivMuQZ0Y/s200/PersistenceService.png)

** JFrameの外側でもドラッグアイコンを表示する [#DragSourceMotionListener]
#swingdescription(Swing/DragSourceMotionListener,JFrameの外側でもドラッグアイコンを表示する,ドラッグ中のカーソル位置をDragSourceMotionListenerで取得し、そこにアイコンを追加したWindowを移動することで、JFrameの外側でもドラッグアイコンを表示します。,https://lh4.googleusercontent.com/-HM5QzW5AZlk/UB9iFlbSZMI/AAAAAAAABQM/fggojAo0b-E/s200/DragSourceMotionListener.png)

** JSliderのノブをドラッグ中にToolTipで値を表示 [#SliderToolTips]
#swingdescription(Swing/SliderToolTips,JSliderのノブをドラッグ中にToolTipで値を表示,JSliderのノブをドラッグ中にToolTipでその現在値を表示します。,https://lh6.googleusercontent.com/-RBRHhAqSA3A/UM3gOvnmIOI/AAAAAAAABZM/LdLir_Y4dQc/s200/SliderToolTips.png)

** JPopupMenuなどからWindowを閉じる [#WindowClosingAction]
#swingdescription(Swing/WindowClosingAction,JPopupMenuなどからWindowを閉じる,JPopupMenuや、JToolBarなどに親Windowを閉じるためのActionを作成します。,https://lh6.googleusercontent.com/-xWsEbhvjfDY/UT2P-83x0FI/AAAAAAAABmc/7isd5KoGMQc/s200/WindowClosingAction.png)

** JToolBarに配置したアイコンをドラッグして並べ替える [#RearrangeToolBarIcon]
#swingdescription(Swing/RearrangeToolBarIcon,JToolBarに配置したアイコンをドラッグして並べ替える,JToolBarに配置したアイコンをドラッグ&ドロップで並べ替えます。,https://lh6.googleusercontent.com/-bxLoJ6g9K_I/UWBOghG3kxI/AAAAAAAABpQ/tvVELkL1RV0/s200/RearrangeToolBarIcon.png)

** JRootPaneにリサイズのための装飾を設定する [#WindowDecorationStyle]
#swingdescription(Swing/WindowDecorationStyle,JRootPaneにリサイズのための装飾を設定する,JFrame自体の装飾を削除し、JRootPaneにリサイズのためのウィンドウ装飾(透明)を設定します。,https://lh3.googleusercontent.com/-6jloCHHvTmw/Ub30100G84I/AAAAAAAABuM/AHxMNa5jyB0/s200/WindowDecorationStyle.png)

* ↑30 ↓31 [#q28241a8]
#adsensebar

** JWindowをデスクトップにスライドインで表示する [#SlideInNotificationWindow]
#swingdescription(Swing/SlideInNotificationWindow,JWindowをデスクトップにスライドインで表示する,JOptionPaneを追加したJWindowを、スライドインアニメーションを使ってデスクトップ上に表示します。,https://lh4.googleusercontent.com/-axruZWDGZys/U98iB0eZi8I/AAAAAAAACK0/hh_jWt5nsi4/s200/SlideInNotificationWindow.png)

** JFrameがデフォルトのウィンドウ装飾を使用する場合のタイトルバー背景色を変更 [#WindowTitleBackground]
#swingdescription(Swing/WindowTitleBackground,JFrameがデフォルトのウィンドウ装飾を使用する場合のタイトルバー背景色を変更,JFrameがデフォルトのウィンドウ装飾を使用する場合、タイトルバーの文字色、背景色などを変更します。,https://lh5.googleusercontent.com/-kMDDoLGWoSA/VEPUosVXWPI/AAAAAAAACQw/94kmPEN2CT8/s200/WindowTitleBackground.png)

** TrayIconの使用中にJFrameを最小化したとき、タスクバーボタンを非表示にする [#HideTaskbarButton]
#swingdescription(Swing/HideTaskbarButton,TrayIconの使用中にJFrameを最小化したとき、タスクバーボタンを非表示にする,TrayIconを使用中にJFrameを最小化した場合に、そのアプリケーションのタスクバーボタンを表示するかどうかを切り替えます。,https://lh4.googleusercontent.com/-tzpDxy7_qEA/VLKpHbpgC8I/AAAAAAAANuw/sRLjm08PrO8/s200/HideTaskbarButton.png)

** Modalで透明なJDialogを使って親のJFrameへの入力をブロックする [#BlockingDialog]
#swingdescription(Swing/BlockingDialog,Modalで透明なJDialogを使って親のJFrameへの入力をブロックする,Modalで透明なJDialogを表示することで、親のJFrame全体への入力操作をブロックします。,https://lh3.googleusercontent.com/-BlvRwXum2Vc/Vi0ubz6y1mI/AAAAAAAAOE4/XKHozK0runE/s200-Ic42/BlockingDialog.png)

** JFileChooserのタイトルバーのIconImageを変更する [#FileChooserIconImage]
#swingdescription(Swing/FileChooserIconImage,JFileChooserのタイトルバーのIconImageを変更する,JFileChooserのタイトルバーアイコンを親のJFrameとは別のアイコンに変更します。,https://drive.google.com/thumbnail?id=1eUMSRA3bh0DZYC2DrIVsGRXTqW_ZsGmHCA)

** Windowの縁をソフトクリッピングでなめらかにする [#SoftClippedWindow]
#swingdescription(Swing/SoftClippedWindow,Windowの縁をソフトクリッピングでなめらかにする,Windowの形を図形で切り抜きした場合に生じる縁のジャギーをソフトクリッピング効果でなめらかに変更します。,https://drive.google.com/thumbnail?id=1qfCcXJGR0gXwMZu9LI_5jSJ_rPNct5o4rg)

** JFrameの最大化、最小化イベントを取得する [#WindowStateListener]
#swingdescription(Swing/WindowStateListener,JFrameの最大化、最小化イベントを取得する,JFrameの最大化、最小(アイコン)化イベントを取得します。,https://drive.google.com/thumbnail?id=13h_n-O0YyO15qpFv76ZEomH-8uWykdNI)

** JFrameのリサイズが可能なサイズグリップ付きのステータスバーを作成する [#StatusBar]
#swingdescription(Swing/StatusBar,JFrameのリサイズが可能なサイズグリップ付きのステータスバーを作成する,JFrameの下部にマウスドラッグでリサイズが可能なサイズグリップ付きのステータスバーを配置します。,https://drive.google.com/thumbnail?id=1axOgWRI88iTM2MsOfCiFhDfcAMnMYCNf)

** JWindowを半透明の滑らかな図形で切り抜きする [#TranslucentFrameShape]
#swingdescription(Swing/TranslucentFrameShape,JWindowを半透明の滑らかな図形で切り抜きする,JWindowを半透明に設定し、その形状を滑らかな縁の図形に変更します。,https://drive.google.com/thumbnail?id=1uukYgcQrWU5d2YRZ1KB2oy830BDRxnYl)

** JFrameのタイトルバーに追加したコンポーネントをドラッグ可能にする [#DraggableTitleBarComponents]
#swingdescription(Swing/DraggableTitleBarComponents,JFrameのタイトルバーに追加したコンポーネントをドラッグ可能にする,JFrameに独自のタイトルバーを設定しその内部に追加したコンポーネントをマウスでドラッグ可能に設定します。,https://drive.google.com/thumbnail?id=1fq7ACTABN4Xp10gFQMkWt-8H0jrsSDfG)

* ↑40 ↓41 [#be878192]
#adsensebar

** JTextAreaとJFrameで幅固定、文字列の折り返し、親枠外まで高さ拡大可能なセルエディタを作成する [#LineWrapListEditor]
#swingdescription(Swing/LineWrapListEditor,JTextAreaとJFrameで幅固定、文字列の折り返し、親枠外まで高さ拡大可能なセルエディタを作成する,JTextAreaを幅固定、文字列の長さに応じた折り返しで高さ伸縮可能に設定し、これをJFrameに配置して親枠外でも表示可能なJListセルラベルエディタとして使用します。,https://drive.google.com/thumbnail?id=1sEuzsyqu2Jzz8PXleIVr44WlUGdeul_8)

** JWindow内にフォーカス可能なコンポーネントを配置する [#JWindowFocus]
#swingdescription(Swing/JWindowFocus,JWindow内にフォーカス可能なコンポーネントを配置する,JWindowや装飾なしのJFrame、JPopupMenuなどにフォーカス可能なコンポーネントを配置するテストを実行します。,https://drive.google.com/thumbnail?id=1tjnD9mtXy7CD07S9aW8kNU7FyC25yk00)

** JTextPaneで中央揃え、行折返し可能なリストセルエディタを作成する [#CenteredMultiRowCellEditor]
#swingdescription(Swing/CenteredMultiRowCellEditor,JTextPaneで中央揃え、行折返し可能なリストセルエディタを作成する,JTextPaneで中央揃え、行折返し可能なエディタを作成し、JFrameに追加してリストセルの編集に使用します。,https://drive.google.com/thumbnail?id=1rvx8N6fXs-31JKGBXFSd18bMepyvmIqN)

** JFrameがアクティブであるかどうかでテキスト選択ハイライト色を変更する [#ActiveWindowSelectionHighlight]
#swingdescription(Swing/ActiveWindowSelectionHighlight,JFrameがアクティブであるかどうかでテキスト選択ハイライト色を変更する,JFrameがアクティブであるかどうかでその子JTextComponentのテキスト選択ハイライトの背景色を変更します。,https://drive.google.com/thumbnail?id=1sOHrYiRZV6ufD9BL06qPXjPKbq61R7ge)

** Robotを使用してスクリーンショットを取得する [#ScreenCapture]
#swingdescription(Swing/ScreenCapture,Robotを使用してスクリーンショットを取得する,Robotを使用してスクリーンショット画像を取得して背景画像として描画することでJFrameを半透明に見せかけます。,https://drive.google.com/thumbnail?id=1e9aL18WI4SjJp5iHgshLy4Kx0XGw0nMD)
#swingdescription(Swing/ScreenCapture,Robotを使用してスクリーンショットを取得する,Robotでスクリーンショット画像を取得し、背景画像として描画することでJFrameを半透明に見せかけます。,https://drive.google.com/thumbnail?id=1e9aL18WI4SjJp5iHgshLy4Kx0XGw0nMD)

** JOptionPaneのタイトルバー背景色をMessageTypeに応じて変更する [#OptionPaneMessageTypeColor]
#swingdescription(Swing/OptionPaneMessageTypeColor,JOptionPaneのタイトルバー背景色をMessageTypeに応じて変更する,JOptionPaneのタイトルバー背景色や縁色などをMessageTypeに対応した色に変更します。,https://drive.google.com/thumbnail?id=1AVd6cPRb_L98qWsiVXcNaQ8LYNvJB9T_)