🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

JdbList - not dispaying data

#13324
From: Peter J Scott
Date: Tue, 11 Aug 1998 00:00
60 lines
2665 bytes
i hope this is the correct group, rather than database.

I have been trying to work with JdbTable and JdbList inside JScrollPane.
I have had some success with JdbTable, although it won't read in all the
rows, but I can't get JdbList to display any data either in the designer
or applet viewer(about 10 rows). The database and query test OK on their
own.

The basic elements of my code are:

public class Applet1 extends JApplet {
  XYLayout xYLayout1 = new XYLayout();
  boolean isStandalone = false;
  JPanel jPanel1 = new JPanel();
  BorderLayout borderLayout1 = new BorderLayout();
  JScrollPane jScrollPane1 = new JScrollPane();
  BorderLayout borderLayout2 = new BorderLayout();
  JPanel jPanel2 = new JPanel();
  JdbList jdbList1 = new JdbList();
  Database database1 = new Database();
  QueryDataSet queryDataSet1 = new QueryDataSet();

  .
  .
  .
  
  private void jbInit() throws Exception {
    xYLayout1.setWidth(400);
    xYLayout1.setHeight(300);
    jScrollPane1.setPreferredSize(new Dimension(100, 40));
    jdbList1.setColumnName("GPAC_1");
    jdbList1.setDataSet(queryDataSet1);
    database1.setConnection(new borland.sql.dataset.ConnectionDescriptor
("jdbc:odbc:DBase", "", "", false, "sun.jdbc.odbc.JdbcOdbcDriver"));
    queryDataSet1.setQuery(new borland.sql.dataset.QueryDescriptor(datab
ase1, "select * from c:\\pr\\gpac1.dbf", null, true, Load.ALL));
    jScrollPane1.getViewport().setLayout(borderLayout2);
    jPanel1.setLayout(borderLayout1);
    this.getContentPane().setLayout(xYLayout1);
    this.getContentPane().add(jPanel1, new XYConstraints(0, 0, 347,
298));
    jPanel1.add(jScrollPane1, BorderLayout.WEST);
    jScrollPane1.getViewport().add(jdbList1, null);
    jPanel1.add(jPanel2, BorderLayout.CENTER);
  }
.
.
.

The only message in the AppAccelerator DOS box is:

Swing: checked access to system event queue, otherwise applet loading
etc messages in the applet viewer seam ok.


I am using swing 1.0.3. Any suggestions would be gratefully recieved

Peter
-- 
Peter J Scott
Technical Details
Message-ID: <zUyjsGAo1J01Ew69@framland.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,cb1becd7ce847414,start
X-Google-Attributes: gid111d45,public
From: Peter J Scott <peter@framland.demon.co.uk>
Subject: JdbList - not dispaying data
Date: 1998/08/11
Message-ID: <zUyjsGAo1J01Ew69@framland.demon.co.uk>
X-Deja-AN: 380153651
X-NNTP-Posting-Host: framland.demon.co.uk:194.222.31.244
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 902864448 nnrp-06:24778 NO-IDENT framland.demon.co.uk:194.222.31.244
Organization: naught
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing