Hi! i tryng to change a Dialog's background keeping the borders rounded. i make the following aproach (see image) but remains a white border on top.
its possible to set the color for the whole dialog?
my code is:
dlg.getContentPane().setUIID("GroupExpanderButtonNaranja");
dlg.getContentPane().getStyle().setMargin(0, 0, 0, 0);
dlg.getContentPane().getStyle().setPadding(0, 0, 0, 0);
Container cntAreaButton = new Container();
cntAreaButton.setLayout(new BorderLayout());
Button btnCerrar = new Button();
btnCerrar.setIcon(statResources.getImage("boton_cerrar.png"));
btnCerrar.addActionListener((l) ->
{
dlg.dispose();
});
cntAreaButton.add(BorderLayout.EAST, btnCerrar);
dlg.getContentPane().setLayout(new BorderLayout());
dlg.add(BorderLayout.NORTH, cntAreaButton);
dlg.getContentPane().add(BorderLayout.CENTER, parContenido);
dlg.showModeless();
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device