๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11710

Jdialog Transparent

#11710
From: pch
Date: Wed, 21 Apr 1999 00:00
72 lines
2378 bytes
I try to show a Waiting Dialog.
But my dialog box appear transparent.
What can i do ?

Here is my code :
Patience patience = new Patience();
patience.show();
...
patience.setVisible(false);


Patience.java
public class Patience extends JDialog
{
  JPanel panel1 = new JPanel();
  XYLayout xYLayout1 = new XYLayout();
  JLabel jLabel7 = new JLabel();
  JLabel jLabel8 = new JLabel();
  boolean bool=false;


  public Patience(Frame frame, String title, boolean modal)
  {
    super(frame, title, modal);
    try
    {
      jbInit();
      pack();
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
  }


  public Patience()
  {
    this(null, "Patience", false);
  }

  void jbInit() throws Exception
  {
    panel1.setLayout(xYLayout1);
    panel1.setEnabled(true);
    panel1.setBackground(new Color(192, 212, 244));
    xYLayout1.setHeight(57);
    xYLayout1.setWidth(169);
    jLabel7.setForeground(new Color(26, 88, 199));
    jLabel7.setFont(new Font("Dialog", 1, 12));
    jLabel8.setText("Je charge les donn๏ฟฝes");
    jLabel8.setForeground(new Color(26, 88, 199));
    jLabel8.setFont(new Font("Dialog", 1, 12));
    jLabel7.setText("un peu de patience");
    getContentPane().add(panel1);
    panel1.add(jLabel8, new XYConstraints(18, 27, 135, 20));
    panel1.add(jLabel7, new XYConstraints(31, 9, 108, 23));
    JRootPane cont= this.getRootPane();
  }

   void Show ()
   {
      this.setVisible (true);
      panel1.paintImmediately(panel1.getBounds());
      jLabel7.paintImmediately(jLabel7.getBounds());
      jLabel8.paintImmediately(jLabel8.getBounds());
   }

}

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
Technical Details
Message-ID: <7fklv0$24u$1@nnrp1.dejanews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111d45,bda5c4f6f2f70387,start
X-Google-Attributes: gid111d45,public
From: pch@cci-brest.fr
Subject: Jdialog Transparent
Date: 1999/04/21
Message-ID: <7fklv0$24u$1@nnrp1.dejanews.com>
X-Deja-AN: 469099117
X-Http-Proxy: 1.0 x9.dejanews.com:80 (Squid/1.1.22) for client 194.51.211.232
Organization: Deja News - The Leader in Internet Discussion
X-Article-Creation-Date: Wed Apr 21 14:05:24 1999 GMT
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.5 [fr] (WinNT; I)