[過去ログ] 【java】CUIゲームライブラリ公開 [転載禁止]©2ch.net (27レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
6: 2015/04/29(水)11:01 ID:Uwxqc1kF(3/6) AAS
フォント確認部分ソース汚いけどとりあえず公開します。インポート省略しています。
class Font2 extends JDialog implements ActionListener{
Font2(){
setSize(290, 150);
setModal(true);
setLocationRelativeTo(null); //真ん中に表示
ImageIcon icon = new ImageIcon("./file/icon.gif"); //アイコン
setIconImage(icon.getImage()); //アイコン
setResizable(false); //サイズ変更不可
JPanel p = new JPanel();
p.setPreferredSize(new Dimension(330, 160));
p.setBackground(Color.WHITE);//色
Container contentPane = getContentPane();
contentPane.add(p, BorderLayout.CENTER);//フレームにパネルを追加
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

JEditorPane t1 = new JEditorPane();
t1.setContentType("text/html");
t1.setText("<html>フォント:「IPA モナー Pゴシック」<br>をインストールして下さい。<br><a href=\"外部リンク:www.geocities.jp\">www.geocities.jp/ipa_mona/</a><br></html>");
t1.setEditable(false);
t1.addHyperlinkListener(new Linke());

JButton b = new JButton("アプリケーションの終了");
b.addActionListener(this);

p.add(t1);
p.add(b);
setVisible(true);
}
1-
あと 21 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.003s