Question: I just wanted to know if there is an option to do a JButton inside here:

```
if(RandomNrJeden <= 50)
{
    JOptionPane.showMessageDialog(frameKontrastGame, "Eggs are not supposed to be green.");
    JButton dialogOdp = new JButton();
}
else
{
    JOptionPane.showMessageDialog(frameKontrastGame, "Eggs are not supposed to be red.");
}

```

And then just type:
 panel.add(dialogOdp);
Outside?

Here is the whole code:

```
final JButton continueGame = new JButton();
continueGame.setPreferredSize(new Dimension(1000, 30)); 
continueGame.setLocation(95, 45);
continueGame.setText("<html>Continue</html>");
continueGame.addActionListener(new ActionListener(){
    @Override
    public void actionPerformed(ActionEvent ev) {
        panel.remove(continueGame);

        SwingUtilities.updateComponentTreeUI(frameKontrastGame);
        if(RandomNrJeden <= 50)
        {
            JOptionPane.showMessageDialog(frameKontrastGame, "Eggs are not supposed to be green.");
            JButton dialogOdp = new JButton();
        }
        else
        {
            JOptionPane.showMessageDialog(frameKontrastGame, "Eggs are not supposed to be red.");
        } 
    }});

    //final JLabel im = new JLabel(new ImageIcon("kontrast_logo_2.png"));        
    //panel.add(im);        
    panel.add(dialogOdp);        
    panel.add(continueGame);        
    frameKontrastGame.getContentPane().add(panel);        
    frameKontrastGame.setLocationByPlatform(true);        
}});

```

Answer: 
**CCS**

```
#map
{
    width: 100px;
    height:100px;
    min-height: 100%;
    min-width: 100%;
    display: block;
}

html, body
{
    height: 100%;
}

.fill
{
    min-height: 100%;
    height: 100%;
    width: 100%;
    min-width: 100%;
}

```

**html**

```
<div class="container fill">
     <div id="map">

     </div> 
 </div>

```
```
body {
    padding: 0;
    margin: 0;
}
html, body, #map, .row-fluid{
    height: 100%;
}

#map {
    width: 100%;
}

.height-css
{
    height: 100%;
}

```

your html will be 

```
<div class="container-fluid">
  <div class="row-fluid">
    <div class="span12 height-css">
         <div id="map"></div> 
     </div>
   </div>
</div>

```