home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JSAMPLES.Z
/
framenoschemaFrame1.java
< prev
next >
Wrap
Text File
|
1998-05-08
|
3KB
|
78 lines
/*
* Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
*
* This SOURCE CODE FILE, which has been provided by Borland as part
* of a Borland product for use ONLY by licensed users of the product,
* includes CONFIDENTIAL and PROPRIETARY information of Borland.
*
* USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
* OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
* THE PRODUCT.
*
* IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
* COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
* OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
* OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
* OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
* OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
* CODE FILE.
*/
package borland.samples.tutorial.dataset.framenoschema;
import java.awt.*;
import java.awt.event.*;
import borland.jbcl.control.*;
import borland.jbcl.layout.*;
import borland.jbcl.dataset.*;
public class framenoschemaFrame1 extends DecoratedFrame {
BorderLayout borderLayout1 = new BorderLayout();
BevelPanel bevelPanel1 = new BevelPanel();
StatusBar statusBar = new StatusBar();
TableDataSet tableDataSet1 = new TableDataSet();
TextDataFile textDataFile1 = new TextDataFile();
GridControl gridControl1 = new GridControl();
NavigatorControl navigatorControl1 = new NavigatorControl();
NavigatorControl navigatorControl2 = new NavigatorControl();
Column column1 = new Column();
Column column2 = new Column();
GridBagLayout gridBagLayout1 = new GridBagLayout();
//Construct the frame
public framenoschemaFrame1() {
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
//Component initialization
private void jbInit() throws Exception{
this.setLayout(borderLayout1);
this.setSize(new Dimension(395, 300));
this.setTitle("TextDataFile Without Schema File");
statusBar.setDataSet(tableDataSet1);
tableDataSet1.setDataFile(textDataFile1);
textDataFile1.setFileName("employeexx.txt");
textDataFile1.setSeparator(",");
gridControl1.setDataSet(tableDataSet1);
navigatorControl2.setDataSet(tableDataSet1);
column1.setColumnName("my_number");
column1.setDataType(borland.jbcl.util.Variant.SHORT);
column2.setColumnName("my_string");
column2.setDataType(borland.jbcl.util.Variant.STRING);
bevelPanel1.setLayout(gridBagLayout1);
this.add(statusBar, BorderLayout.SOUTH);
this.add(bevelPanel1, BorderLayout.CENTER);
bevelPanel1.add(gridControl1, new GridBagConstraints2(0, 0, 2, 2, 1.0, 1.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(-1, 0, -1, 0), 165, 140));
bevelPanel1.add(navigatorControl1, new GridBagConstraints2(0, 1, 1, GridBagConstraints.REMAINDER, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 53, 0, 0), -291, -24));
this.add(navigatorControl2, BorderLayout.NORTH);
tableDataSet1.setColumns(new Column[] {column1, column2});
}
}