回答編集履歴
1
サンプル追記
    
        answer	
    CHANGED
    
    | @@ -131,4 +131,30 @@ | |
| 131 131 | 
             
            }
         | 
| 132 132 | 
             
            ```
         | 
| 133 133 |  | 
| 134 | 
            -
            
         | 
| 134 | 
            +
            
         | 
| 135 | 
            +
             | 
| 136 | 
            +
            ---
         | 
| 137 | 
            +
             | 
| 138 | 
            +
            サンプル追記
         | 
| 139 | 
            +
            ```Java
         | 
| 140 | 
            +
            static class Message extends JPanel {
         | 
| 141 | 
            +
                public Message(String message, ImageIcon icon, FlowLayout layout) {
         | 
| 142 | 
            +
                    setLayout(layout);
         | 
| 143 | 
            +
                    setBackground(Color.WHITE);
         | 
| 144 | 
            +
             | 
| 145 | 
            +
                    JPanel panel = new JPanel();
         | 
| 146 | 
            +
                    panel.add(new JLabel(icon));
         | 
| 147 | 
            +
             | 
| 148 | 
            +
                    JPanel p1 = new JPanel();
         | 
| 149 | 
            +
                    // 雑い フォントサイズによりずれると思われる
         | 
| 150 | 
            +
                    p1.setPreferredSize(new Dimension(170,70));
         | 
| 151 | 
            +
                    p1.add(new JButton("\uD83D\uDE00"));
         | 
| 152 | 
            +
                    p1.add(new JButton("\uD83D\uDE11"));
         | 
| 153 | 
            +
                    p1.add(new JButton("\uD83D\uDE0D"));
         | 
| 154 | 
            +
                    p1.add(new JButton("保存"));
         | 
| 155 | 
            +
             | 
| 156 | 
            +
                    panel.add(p1);
         | 
| 157 | 
            +
                    add(panel);
         | 
| 158 | 
            +
                }
         | 
| 159 | 
            +
            }
         | 
| 160 | 
            +
            ```
         | 
