All pastes #576796 Raw Edit

Extending JDialogs

public java v1 · immutable
·published 2007-06-19 16:58 UTC
rendered paste body
// My first JDialog classimport javax.swing.*;import java.awt.*;import java.awt.event.*;public class myDialog1 extends JDialog{	public myDialog1 ()	{			Container cont = getContentPane();		setTitle(" Hello ");		setLayout(null);		setSize(200,200);		cont.setBackground(Color.BLACK);	}}// My second JDialog classimport javax.swing.*;import java.awt.*;import java.awt.event.*;public class myDialog2 extends myDialog1{	public myDialog2 ()	{	            super();            getContentPane().setBackground(Color.WHITE);	}}// How do I change the background color in myDialog2 ?