Not really. Skinning an entire GUI correctly can be a tough problem.
Hmm, OK.
That's more or less how I'd do it.
The same way I showed you, and I'd guess the same way you'd do it in C#:
use a reference to the parent "form" in the controller for the dialog.
Yes and no, depending on other requirements. Do you have any code to
show us? What images and where? Can we get that SSCCE from you?
http://pscode.org/sscce.html
Here's another thought: can you write this code in C#? Can you show us
a working example?
OHHHH YES I DID IT !
Finally JDialog was a correct way to do the trick. In the meantime I
started to like Java

Still please remember this is my first Java code, so keep your
rofls

Here's a call from the parent form:
---------------------------------------
mydialog m= new mydialog();
m.setModal(true);
m.setVisible(true);
int a=m.getResAction();
System.out.println(a);
---------------------------------------
And here's the child: (I hope it keeps formatting)
---------------------------------------
package wbsrvc;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
public class mydialog extends JDialog {
ImageIcon backIcon = new ImageIcon("/home/osiaq/Desktop/
background.png");
ImageIcon btYesIcon = new ImageIcon("/home/osiaq/Desktop/
btYesBack.png");
ImageIcon btCancelIcon = new ImageIcon("/home/osiaq/Desktop/
btCancelBack.png");
private int resAction = -1;
public int getResAction() {
return resAction;
}
public void setResAction(int resAction) {
this.resAction = resAction;
}
public mydialog() {
this.setBounds(1, 1, 432, 250);
this.setSize(new Dimension(432, 250));
this.isModal();
this.setLayout(new BorderLayout());
this.setUndecorated(true);
JButton btYes = new JButton(btYesIcon);
JButton btCancel = new JButton(btCancelIcon);
JLabel label = new JLabel(backIcon);
label.setSize(new Dimension(200, 200));
btYes.setSize(new
Dimension(btYesIcon.getImage().getWidth(null),
btYesIcon.getImage().getHeight(null)));
btCancel.setSize(new
Dimension(btCancelIcon.getImage().getWidth(null),
btCancelIcon.getImage().getHeight(null)));
btYes.setLocation(50, 200);
btCancel.setLocation(250, 200);
btYes.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent
evt) {
btYesActionPerformed(evt);
}
});
btCancel.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent
evt) {
btCancelActionPerformed(evt);
}
});
btYes.setBorder(BorderFactory.createEmptyBorder());
btCancel.setBorder(BorderFactory.createEmptyBorder());
this.add(btYes);
this.add(btCancel);
this.add(label);
}
private void btYesActionPerformed(java.awt.event.ActionEvent evt)
{
setResAction(1);
dispose();
}
private void btCancelActionPerformed(java.awt.event.ActionEvent
evt) {
setResAction(0);
dispose();
}
}