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: 
With CSS from project [Bootleaf](https://github.com/bmcbride/bootleaf) on Github:

```
html,body, #map{
    height:100%;
    width: 100%;
overflow: hidden;
}
body {
    padding-top: 50px;

```
In addition to setting the height property of the map div to 100% you might need to implement [this](https://stackoverflow.com/questions/10762984/leaflet-map-not-displayed-properly-inside-tabbed-panel) to ensure that the map fills the div on a resize.