How to create the Frame object with API in 6i?

do i create an item using d2fitmcr_Create, and then set the type or style to frame? or is it a graphics item that i have to create using a different function? ive tried various combinations with no luck.
ive looked at the frame object in the GUI, and cant figure out how to duplicate it using the API (the frame object is the thin line box with a label used to groups items visually on a form)
thanks!
[email protected]

Frame is a type of graphic d2fgracr_Create() (d2fgra.h) then set the type as required using d2fgras_graphics_typ():
Definition of Graphics types is in d2fdef.h
** Graphics Type (D2FP_GRAPHICS_TYP)
** [BPT]
#define D2FC_GRTY_ARC              0                                 /* Arc */
#define D2FC_GRTY_IMAGE            1                               /* Image */
#define D2FC_GRTY_LINE             2                                /* Line */
#define D2FC_GRTY_POLY             3                             /* Polygon */
#define D2FC_GRTY_RECT             4                           /* Rectangle */
#define D2FC_GRTY_RREC             5                   /* Rounded Rectangle */
#define D2FC_GRTY_TEXT             6                                /* Text */
#define D2FC_GRTY_GROUP            7                               /* Group */
#define D2FC_GRTY_FRAME            8                               /* Frame */All the various properties for setting up the associated block etc (if required) can be set through macros in d2fgra.h

Similar Messages

  • How to create the funtion module with step by step

    friends can u help me regarding how to create the function module very urgent,
    regards
    bhavani

    To create a function module, you first need to create a Function Group which will keep all the function module of same functionality.
    To create a Function Group, go to SE80->Click on Workbench-Edit Object->Function Group Tab->Enter Function Group name-> Click Create.
    To create a Function Module:
    Go to T.Code SE37->Enter the Function name->Enter Function Group name n Short Des.-> Here you need to define Import, Export parameters with the condition. Also you can write your code in source code tab.
    check this link
    Converting seconds values
    check the FM code. if you don't have this FM code, create it in SE37 and make use of it.
    FM MONI_TIME_CONVERT
    FUNCTION MONI_TIME_CONVERT.
    ""Lokale Schnittstelle:
    *" IMPORTING
    *" REFERENCE(LD_DURATION) TYPE SY-TABIX
    *" EXPORTING
    *" REFERENCE(LT_OUTPUT_DURATION) TYPE SWL_PM_CVH-DURATION
    DATA: LD_HOUR(4) TYPE N. "
    DATA: LD_MIN(4) TYPE N. "
    DATA: LD_SEC(4) TYPE N. "
    DATA: LD_VALUE2(2) TYPE N.
    DATA: LD_VALUE3(3) TYPE N.
    DATA: LD_VALUE4(4) TYPE N.
    DATA: SAVE_DURATION LIKE SY-TABIX.
    data: ld_minus(1).
    SAVE_DURATION = LD_DURATION.
    if ld_duration < 0.
    save_duration = save_duration * ( -1 ).
    ld_minus = true.
    endif.
    CLEAR LT_OUTPUT_DURATION.
    IF SAVE_DURATION NE 0.
    LD_HOUR = SAVE_DURATION DIV 3600.
    save_duration = save_duration - ld_hour * 3600.
    LD_MIN = SAVE_DURATION DIV 60.
    save_duration = save_duration - ld_min * 60.
    LD_SEC = SAVE_DURATION.
    IF LD_HOUR LE 100.
    LD_VALUE2 = LD_HOUR.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+3(2).
    ELSEIF LD_HOUR LE 1000.
    LD_VALUE3 = LD_HOUR.
    WRITE LD_VALUE3 TO LT_OUTPUT_DURATION+2(3).
    ELSE.
    LD_VALUE4 = LD_HOUR.
    WRITE LD_VALUE4 TO LT_OUTPUT_DURATION(4).
    ENDIF.
    WRITE ':' TO LT_OUTPUT_DURATION+5.
    LD_VALUE2 = LD_MIN.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+6(2).
    WRITE ':' TO LT_OUTPUT_DURATION+8.
    LD_VALUE2 = LD_SEC.
    WRITE LD_VALUE2 TO LT_OUTPUT_DURATION+9(2).
    LT_OUTPUT_DURATION = LT_OUTPUT_DURATION+1.
    if ld_minus = true.
    write '-' to lt_output_duration+1(1).
    endif.
    ELSE.
    job running or aborted
    ENDIF.
    ENDFUNCTION.
    Eg:2
    Use the following procedure to create a function module
    1.From the ABAP/4 Development Workbench screen, press the Function Library button on the Application toolbar.
    2.Type the name of your function module in the Function Module field. The name must begin with Y_ or Z_.
    3.Press the Create button. The Function Module Create: Administration screen is shown
    4.Type the name of a function group in the Function Group field. The function group name must be four characters long and must begin with Y or Z.
    5.Type an S in the Application field. This field is used to indicate which function area uses the function module. Our functionality is not used by any functional area, it is simply an example, so any choice will do. (S indicates that the function module contains functionality needed by Basis.)
    6.Type a description of the function module in the Short Text field. The contents of this field are seen when displaying a list of function modules.
    Press the Save button on the Application toolbar.
    7.If the function group does not already exist, a pop-up informs you of that fact and asks you if you want to create it. Press the Yes button to create the function group. The Create Function Group dialog box appears. Type a description in the Short Text field and press the Save button. The Create Object Catalog Entry screen appears. Press the Local Object button. You are returned to the Function Module Change: Administration screen.
    8.Press the Source Code button on the Application toolbar. The Function Module Edit screen is displayed.
    9.Type the source code for your function module. Do not change the system-generated comment lines under any circumstances! Your function module might fail to operate if you do.
    10.Press the Save button on the Application toolbar. The message Program xxxxx saved appears in the status bar at the bottom of the window.
    11.Press the Back button on the Application toolbar. You are returned to the Function Library Initial screen.
    12.If you want to define import or export parameters, select the Import/Export Parameter Interface radio button. Press the Change pushbutton. You are shown the Import/Export Parameters screen (refer to Figure 19.6). Type the names of your parameters in the first column and enter any other desired characteristics for each parameter. When you are finished, press the Save button and then the Back button.
    13.Finally, to activate your function module, press the Activate button on the Application toolbar of the Function Library Initial Screen.
    http://www.erpgenie.com/abap/bapi/example.htm

  • SAP Cloud SDK : How to create the Note Field with Char 1000 length

    Hi Experts,
    I have a requirement to create Note type fields in the standard business object. and that note field should be 1000 char length.
    Also I need to check whether that Note field we can add under the standard report or not with report enhancement?
    1) How to make a Note type field using SDK with length 1000 char? Is it possible? If yes How ?
    2) If using SDK Note type field possible then how to display that field in report ?
    Many Thanks,
    Mithun

    Hi Frank and Horst,
    I have followed the steps you have mentioned in the post.
    1) Create Business Object Extension.
    2) Add the Custom Field with Type " LANGUAGEINDEPENDENT_EXTENDED_Text".
    3) Enhance the Screen and Add into the Header section of the COD_TI screen.
    I have successfully entered the unrestricted character into that field.
    But I want to add that custom field into the Standard Data Source or Standard Report.
    1) Is it possible to add custom field under the Standard Data Source or Report Using SDK?
    2) Is it Possible to display the 1000 character length on the Report field?
    3) Is it possible to display the created extension field under the report / data source using SDK?
    Many Thanks,
    Mithun

  • How to create a Type Object with Dynamic select query columns in a Function

    Hi Every One,
    I'm trying to figure out how to write a piplined function that executes a dynamic select query and construct a Type Object in order to assigned it to the pipe row.
    I have tried by
    SELECT a.DB_QUERY INTO actual_query FROM mytable a WHERE a.country_code = 'US';
    c :=DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(c,actual_query,DBMS_SQL.NATIVE);
    l_status := DBMS_SQL.EXECUTE(c);
    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.DEFINE_COLUMN(c,j,v_val,2000);
    END LOOP;
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.COLUMN_VALUE(c,j,v_val);
    END LOOP;
    But got stuck, how to iterate the values and assign to a Type Object from the cursor. Can any one guide me how to do the process.
    Thanks,
    mallikj2

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

  • How to create a ClobDomain object with a default's different charset.

    Hi,
    I'm developing a 10.1.3. ADF Faces application that need to upload a File to a CLOB column. The user will usually upload a text file CP1252 charset, but in samples like this:
    // read data into a character array
    char[] data = {'0','1','2','3','4','5','6','7','8','9'};
    // write the array of character data to a CLOB
    writer = ((CLOB)my_clob).getCharacterOutputStream();
    writer.write(data);
    writer.flush();
    writer.close();
    The writer object is always a defaults charset writer.
    Does anybody knows how to do this?
    Thanks,
    Edited by: Samuel Fisch on 05/01/2010 02:06

    Samuel,
    My understanding is that unicode should be able to hold all possible characters codes. So you upload something in unicode, store it in the db and later on view it from the db you should see the contents of the clob (in the default encoding of your pc).
    The question for me is if the db can store all character codes. this is not the case if you use an oracle db and have not set the db character code to unicode (i.e. utf-8). In this case all characters of the input stream which are not part of the db character set are mapped to <b>one</b> special character code which you can't read. When you read the clob back you see some strange characters.
    This is not the problem of writing/reading the clob but a problem with the db character set.
    If you load data to the clob from a system using windows-1252 character set and this data contains some special characters like 'öäü', the db character set is set to utf-8, you should be able to read the clob data on a system using iso-8859-1 character set (or any other which have 'äöü') and see the special characters. That's the reason the reader/writer uses the system default character set.
    If you see a different behavior, describe where you see the error or wrong characters.
    Timo

  • How to create AD contact object with multiple proxyAddresses?

    Hello,
    I need to create AD contact with multiple proxyAddresses to be used in mail routing.
    How can I accomplish this using Java?
    I can create an AD contact with single value fine. But I don't know how to populate a multivalue attribute.
    proxyAddresses: smtp:mytestuser@Domain1
    proxyAddresses: SMTP:mytestuser@Domain2
    Also, how do I update a multivalue attribute? When first name and/or last changes, the proxyAddresses will need to be updated?
    How can I do this?
    Thanks
    Khanh

    This error is no longer coming up, it is now saying that it has an unsupported class version error. I believe this may be because the class file and library files have been complied under different versions, is there a method to check this?

  • How to create the new row with existing values

    Hi all,
    first of all i create a row,
    i opened that in edit mode,
    suppose i want to edit any one of the value in that recordd,
    that time compulsory create a new row with those valuess.
    how can i create a new row with those valuess.

    Hi Anusha,
    This code correct for your requirement, only thing is you are not able to modify it as per your requirement.
    What you have to do is:
    1. Copy queried row into into new row, change primary key values(but don't commit your changes here).
    2. Now you have two rows in your VO(OLD as well as New)
    3. Make any changes if you want using User Interface.
    4. At the save button first compare OLD and NEW row, if any value is differing then commit the chnages(it will insert new row in corresponding database table), if no changes are there I mean to say OLD value and NEW rows are same then rollback(it will remove copied row from VO and no row will be inserted in database.)
    While comparing rows please note that Primary keys will not be same so don't compare Primary keys while comparing rows.
    I hope it will help you.
    Regards,
    Reetesh Sharma

  • How to get the search field with API UCM  for a specific UCM Profil

    We have UCM 10g
    For the checkIn we have for exemple the URL : http://xp-ucm1.oth.prs/idc/idcplg?IdcService=CHECKIN_NEW_FORM&dpTriggerValue=1&dpDisplayLabel=Codification%201&IsSoap=1
    To obtain all the field for the checkIn is very simple with this service(IdcService=CHECKIN_NEW_FORM) and RIDC, but for search we don't find the idc service ?
    <SOAP-ENV:Envelope>

    <SOAP-ENV:Body>

    <idc:service IdcService="CHECKIN_NEW_FORM">

    <idc:document dRevLabel="1" dUser="sysadmin" dDocName="" dDocTitle="">
    <idc:field name="xClbraUserList:isExcluded">1</idc:field>
    <idc:field name="xsgti_top_rule:isSetDefault">1</idc:field>
    <idc:field name="xlist1:isExcluded">1</idc:field>
    <idc:field name="xsgti_g_ll_niv1_1:isExcluded">1</idc:field>
    <idc:field name="xsgti_chrono_soc"/>
    <idc:field name="xsgti_g_entier4:isExcluded">1</idc:field>
    any ideas

    Hi,
    In fact, I don't want to send parameters to the search service but to get the fields to display an advanced search form of my own.
    Some rules and profiles filters the amount of fields availables and having a service that can do this filtering for me would be very useful.
    The check-in service do this for a trigger value (profile), but I can't find how UCM uses services to display the search form with the right fields depending on the rules and rights of the user.
    When I call a search form, UCM calls a service : http://xxx.xxx.xxx.xxx:xx/idc/idcplg?IdcService=GET_DOC_PAGE&Action=GetTemplatePage&Page=STANDARD_QUERY_PAGE&dpTriggerValue=xxx&dpDisplayLabel=xxx
    But with &IsSoap=1, the values returned are not good, some fields are missing, the field captions are not right... I guess UCM calls sub-services but which ones ?
    Thanks :)

  • How to create the deployment descriptor with the sun application server

    I have packaged my .war and ejb-jar files. I go to autodeploy and it says i need a deployment descriptor?

    this is actually an example .ear file that i am trying to run. When i create the client with the deploytool that comes with suns application server i get
    C:\appclient>appclient -client swe645-appClient.jar
    Caught an unexpected exception!
    javax.naming.NameNotFoundException: EditEmpBean not found
            at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.
    java:185)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.ja
    va:157)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialCont
    extProviderImpl.java:101)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Reflecti
    veTie.java:123)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tchToServant(CorbaServerRequestDispatcherImpl.java:648)
            at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispa
    tch(CorbaServerRequestDispatcherImpl.java:192)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    Request(CorbaMessageMediatorImpl.java:1709)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:1569)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(C
    orbaMessageMediatorImpl.java:951)
            at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.call
    back(RequestMessage_1_2.java:181)
            at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest
    (CorbaMessageMediatorImpl.java:721)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatc
    h(SocketOrChannelConnectionImpl.java:473)
            at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(
    SocketOrChannelConnectionImpl.java:1262)
            at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.
    run(ThreadPoolImpl.java:409)

  • How to create the composite control with textinput,button and grid.

    I have created the application having two Textinput  and three button and a DataGrid.
    1. on click of first button next to "select a value" , a DataGrid will be open.
    and i am using all the functionality of DataGrid.
    2. now by using all of these control i have required to create single composite control.
    plz help me how to create this composite control.

    Right click the graph and select Create>Property Node. On the diagram, find the property node, right click it and first select Change All to Write. Right click again and if you select Properties, you will see a list of all the available properties for the graph. The properties you want are XScale.Minimum, XScale.Maximum, XScale.Increment, YScale.Minimum, YScaleMaximum, and YScale.Increment. You can grow the single property node to have as many properties that you want. Once you have all the properties created, create front panel controls and wire them to the property node. See the attached picture.
    Attachments:
    graph_properties.jpg ‏16 KB

  • How to create a ActiveX Object with custom classes

    Hi
    I am trying to create a Active X object for some of the work I have done in Java to be used with VB, but I cannot get the Active X object to generate and it always come up with the following error:
    Exception occurred during event dispatching:
    java.lang.NoClassDefFoundError: uk/co/agena/minerva/model/Model
    at java.lang.Class.getMethods0(Native Method)
    at java.lang.Class.getDeclaredMethods(Unknown Source)
    at java.beans.Introspector$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)
    at java.beans.Introspector.getTargetEventInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at sun.beanbox.JarInfo.<init>(Unknown Source)
    at sun.beanbox.JarLoader.createJarInfo(Unknown Source)
    at sun.beanbox.JarLoader.loadJar(Unknown Source)
    at sun.beans.ole.Packager.loadBean(Unknown Source)
    at sun.beans.ole.Packager.generate(Unknown Source)
    at sun.beans.ole.Packager.actionPerformed(Unknown Source)
    at java.awt.Button.processActionEvent(Unknown Source)
    at java.awt.Button.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    This appears to be beacuse the class uk/co/agena/minerva/model/Model is a custom class which is based on the software I am using. Does anyone know how I can get around this issue. I have tried incluijng those class files for the custom classes within the jar file, but I continue to get the same issue?
    Any help would be gratefully received.
    Thanks
    Angie

    This error is no longer coming up, it is now saying that it has an unsupported class version error. I believe this may be because the class file and library files have been complied under different versions, is there a method to check this?

  • How to create a date object with a specific time?

    How can I create a date with today's date but with a specific time, say: 20:00:00?
    Thanks in advance.

    Don't forget about those pesky milliseconds!I'd have gotten away with it too.. if it hadn't been
    for that pesky BigDaddyLoveHandles.I'm in top form today. On the drive in to work I managed to
    push two scooter riders off the road and gave the finger to
    a Prius owner.

  • How to create the Contribution region with Native document

    HI,
    I have the below scenario to have the Contribution region in my custom page.
    1) I am displaying all Campaign records in primary page.
    2) When I click on each Campaign record, this will take me to secondary page to display the Editable Contribution region assigned with Native document.
    My requirement :
    3) I have 4 more Contribution Regions which will have to relate to the same above said Campaign in secondary page. To achieve this, I have only one contribution region with multiple elements within that region in my secondary page.
    Please let me know how I can add different native documents to 4 different Contribution Regions. Now if I add different document to the region, same document will be assigned to the each region having different elements. Also if I add multiple regions in secondary page, primary page will only point to first region available in that secondary page.
    Please let me know how I can add 4 different native documents to 4 different Contribution Regions available in secondary page. It would be great if any one give idea as soon as possible.
    Thanks in advance.
    Anyone did not come across this type of scenario?
    Thanks,
    Ramesh
    Edited by: Ramesh_Est on Aug 10, 2010 9:35 PM

    The secondary page is used to display a specified content item. One content item, specified on demand. Only one. Period.
    If you want to assign multiple content items to multiple regions, well you're talking about primary pages.

  • How to create a circle object with center(lat/long) and radius(kilo)?

    Hi
    I want to create a circle in my table, the data I have are the coordinate of center(lat/long) and the radius of the circle. The srid of the table is lat/long.
    Did I have to use some fomula to compute the coordinate of three points on the circle? If it's true, is there any example procedure you can show me?
    Thanks
    Lannie

    When a circle is created using SDO_BUFFER in geodetic space,
    the result is a circle with stroked arcs (as in arc_densify function).
    So the result from SDO_BUFFER will be a valid polygon without arcs,
    but approximate circle with straight lines.
    For example, in the example given by Dan, this is what you get:
    SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(-120, 42.09003, -120.03128, 42.086958, -120.06042, 42.0779524, -120.08543, 42.0636292, -120.1046, 42.0449675, -120.11663, 42.0232424, -120.1207, 41.9999365,
    -120.11654, 41.9766391, -120.10445, 41.9549369, -120.08526, 41.9363067, -120.06028, 41.9220148, -120.0312, 41.9130321, -120, 41.9099686, -119.9688, 41.9130321,
    -119.93972, 41.9220148, -119.91474, 41.9363067, -119.89555, 41.9549369, -119.88346, 41.9766391, -119.8793, 41.9999365, -119.88337, 42.0232424, -119.8954, 42.0449675, -119.91457, 42.0636292, -119.93958, 42.0779524, -119.96872, 42.086958, -120, 42.09003))
    siva

  • How to Populate the JTable Object programatically with SQL Results

    I'm wondering if someone could help me on how to populate the JTable Object with SQL Results wherein the Row of tjhe JTable object is automatically adjusted depending on how many records you have queried.
    Thanks in advance and God bless! (",)
    * frmMain.java
    * Created on October 4, 2006, 6:15 AM
    package tds;
    import java.io.*;
    import java.awt.Toolkit;
    import javax.swing.JFrame;
    import javax.imageio.*;
    import javax.swing.JFrame;
    import java.sql.*;
    import javax.swing.table.DefaultTableModel;
    * @author Dexter.Carlit
    public class frmMain extends javax.swing.JFrame {
    private Connection connection = null;
    private DefaultTableModel model;
    /** Creates new form frmMain */
    public frmMain() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
    jSplitPane = new javax.swing.JSplitPane();
    jScrollPane1 = new javax.swing.JScrollPane();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTree1 = new javax.swing.JTree();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel1 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jTextField3 = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    jTextField4 = new javax.swing.JTextField();
    jPanel5 = new javax.swing.JPanel();
    jScrollPane3 = new javax.swing.JScrollPane();
    jGrid = new javax.swing.JTable();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jProgressBar1 = new javax.swing.JProgressBar();
    jPanel2 = new javax.swing.JPanel();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowOpened(java.awt.event.WindowEvent evt) {
    formWindowOpened(evt);
    getAccessibleContext().setAccessibleName("frmMain");
    jSplitPane.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    jSplitPane.setDividerLocation(200);
    jSplitPane.setDividerSize(10);
    jScrollPane2.setViewportView(jTree1);
    org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel3Layout.createSequentialGroup()
    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 916, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jPanel3Layout.setVerticalGroup(
    jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 410, Short.MAX_VALUE)
    jScrollPane1.setViewportView(jPanel3);
    jSplitPane.setLeftComponent(jScrollPane1);
    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
    jLabel1.setText("First Name:");
    jLabel2.setText("Last Name:");
    jLabel3.setText("Position :");
    jLabel4.setText("Department:");
    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Results"));
    jGrid.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    new String [] {
    "LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
    jGrid.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
    jGrid.setColumnSelectionAllowed(true);
    jGrid.setName("");
    jGrid.setTableHeader(jGrid.getTableHeader());
    jScrollPane3.setViewportView(jGrid);
    jScrollPane3.getAccessibleContext().setAccessibleName("rset");
    org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(
    jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE)
    jPanel5Layout.setVerticalGroup(
    jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
    jButton1.setText("Find");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton1MouseClicked(evt);
    jButton2.setText("Clear");
    jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    jButton2MouseClicked(evt);
    org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
    jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel1)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel2)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
    .add(1, 1, 1))
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4Layout.createSequentialGroup()
    .add(jLabel3)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jLabel4)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jTextField4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
    .add(jPanel4Layout.createSequentialGroup()
    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
    .addContainerGap())
    jPanel4Layout.linkSize(new java.awt.Component[] {jButton1, jButton2}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
    jPanel4Layout.setVerticalGroup(
    jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel1)
    .add(jTextField1))
    .add(18, 18, 18)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel2)
    .add(jTextField2))
    .add(16, 16, 16)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel3)
    .add(jTextField3)
    .add(jLabel4)
    .add(jTextField4))
    .add(14, 14, 14)
    .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jProgressBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE))
    .addContainerGap())
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(jProgressBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    jTabbedPane1.addTab("Search", jPanel1);
    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(0, 458, Short.MAX_VALUE)
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(0, 401, Short.MAX_VALUE)
    jTabbedPane1.addTab("Directory", jPanel2);
    jSplitPane.setRightComponent(jTabbedPane1);
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jSplitPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 675, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jSplitPane)
    pack();
    }// </editor-fold>//GEN-END:initComponents
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    }//GEN-LAST:event_jButton1ActionPerformed
    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked
    jGrid.setModel(new javax.swing.table.DefaultTableModel(
    new Object [][] {
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null},
    {null, null, null, null, null, null, null, null, null, null}
    new String [] {
    "LName", "FName", "Position", "Department", "Office No", "Local No", "Office Mobile No", "Home No", "MobileNo", "Email Address"
    jGrid.updateUI();
    }//GEN-LAST:event_jButton2MouseClicked
    private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
    try {
    //Load and register SQL Server driver
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    //Establish a connection
    Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://X.X.X.X:1433","MyAccount","MyPassword");
    //Create a Statement object
    Statement sql_stmt = connection.createStatement();
    //Create a ResultSet object, execute the query and return a
    // resultset
    ResultSet rset = sql_stmt.executeQuery("SELECT * FROM EpxDirectory..Directory Order By LName");
    // Populates a JTABLE Object
    int i=0;
    while (rset.next()){
    String LName = rset.getString(1);
    String FName = rset.getString(2);
    String Position = rset.getString(3);
    String Dept_Code = rset.getString(4);
    String OffPhoneNo = rset.getString(5);
    String LocalNo = rset.getString(6);
    String OffMobileNo = rset.getString(7);
    String HomePhoneNo = rset.getString(8);
    String MobileNo = rset.getString(9);
    String Email = rset.getString(10);
    jGrid.updateUI();
    jGrid.setValueAt(rset.getString(1).trim(),i,0);
    jGrid.setValueAt(rset.getString(2).trim(),i,1);
    jGrid.setValueAt(rset.getString(3).trim(),i,2);
    jGrid.setValueAt(rset.getString(4).trim(),i,3);
    jGrid.setValueAt(rset.getString(5).trim(),i,4);
    jGrid.setValueAt(rset.getString(6).trim(),i,5);
    jGrid.setValueAt(rset.getString(7).trim(),i,6);
    jGrid.setValueAt(rset.getString(8).trim(),i,7);
    jGrid.setValueAt(rset.getString(9).trim(),i,8);
    jGrid.setValueAt(rset.getString(10).trim(),i,9);
    i++;
    //Close the ResultSet and Statement
    rset.close();
    sql_stmt.close();
    //Close the database connection
    connection.close();
    System.out.println(Integer.toString(i) + " rows found");
    } catch(Exception e) {
    System.out.println("Failed to connect; Please view Stack Trace");
    e.printStackTrace();
    }//GEN-LAST:event_jButton1MouseClicked
    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
    }//GEN-LAST:event_formWindowOpened
    public static void run(){
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    frmMain frmMain = new frmMain();
    frmMain.setLocationRelativeTo(null); // Center the JFrame on the
    frmMain.setVisible(true);
    private void exitApplication() {
    // try {
    // //gui.putStatus("Closing the connection....please wait.....");
    // if(connection != null) {
    // // connection.close(); //Closing the connection object.
    // } catch(SQLException ex) { //Trap SQLException
    // //gui.putStatus(ex.toString());
    System.exit(0); //Exit the aplication
    * @param args the command line arguments
    public static void main(String args[]) {
    run();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JTable jGrid;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSplitPane jSplitPane;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTree jTree1;
    // End of variables declaration//GEN-END:variables
    }

    Use code tags.
    Don't mix GUI and JDBC together. Split them out into separate classes.
    You have a good start, but you will need to loop through your resultset and also pull the ResultSet metaData for you column headings

Maybe you are looking for

  • Error When Opening iTunes

      Windows XP SP2  This suddenly started happening and I don't know why. When I open iTunes it says "iTunes has encountered a problem and needs to close." then it closes. No iTunes window pops up or anything, just this error window. It has no relevant

  • Bridge CS6 - extremely slow preview updates and image deleting

    1. Updating previews (100%) is very slow. Bridge CS6 has problems updating the previews of images that get edited. While creating preview from scratch is rather swift, updating previews takes about six minutes on a MacBook Pro retina with 16Gb RAM. A

  • Document Split on Non Leading Ledger

    Hi Friends, Can we activate document split on Non leading Ledgers also? Actually my client wants to maintain Leading ledger as per US GAAP and Non leading ledgers as per Schedule VI So there is a requirement of activating document split on the non le

  • Delivery quantity need not be exceed, After creating STO-PO in TCODE  VL02N

    Hello Gurus,, Greetings!!!! Tcode- VL02N... While we do PGI / SAVE after the changing the delivery quantity in Tab "Picking", it need to be checked that delivery quantity not be exceed then quantity entered while STO PO has been created for that part

  • Tree Size Limitation Error

    Hi, i have the problem that when i fill a tree box with over 5000 entries, the entries over a spezified number are showed completely gray, that means there is a border where the whole box is turning in gray and you can't read anything. Turning back w