Adding ScrollPane to Table

Hi all,
I am Doing project in Java Swing. I need a help line for using scroll pane with table and textarea.
final String[] colheads={"Book Name","Due Date"};
final Object[][] data={{"",""},{"",""},{"",""},{"",""},{"",""},{"",""}};
JTable table=new JTable(data,colheads);
JScrollPane jsp=new JScrollPane(table);//,ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
panel.add(jsp);
getContentPane().add(panel);

Well I can't really say without seeing any code, but try this
package testing;
import javax.swing.*;
public class Test
  public static void main(String[] args)
    JFrame frame = new JFrame("Test");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    String[] data = {"Ankka", "Possu", "Sorsa", "Nakki"};
    JList list = new JList(data);
    JScrollPane scroller = new JScrollPane(list, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    frame.add(scroller);
    frame.pack();
    frame.setVisible(true);
}#

Similar Messages

  • Nothing added to the table of contents

    I'm using the "Biography" template (portrait only) in iBooks Author. According to Help,
    "By default, the table of contents includes all paragraphs in the book that use the Heading 1 and Heading 2 style, but you can include whichever styles you like."
    So I paste some text into the first two pages of my new book. I select a line of text, show the Styles drawer, and click Heading 1 or Heading 2.
    I choose Table of Contents from the sidebar, and there's nothing added to the table of contents. I preview it on my iPad. Same problem.
    Am I doing something wrong?

    Hello Nick,
    Jquery may be help you to create own TOC and add custom links into it. Here is some ref for you:
    http://tommdaly.wordpress.com/2013/06/27/customize-table-of-contents-remove-libraries-navigation-headers/
    http://sharepointsharpener.wordpress.com/2011/09/27/quick-fix-remove-libraries-lists-from-toc/
    You may also create one custom list and add link to this list. Then get link from this list and place in webpart wherever you want.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Adding field to Table Control

    Hi Folks,
         I have a requirement of adding a field in Table control of Standard SAP transaction also updating the same in standard SAP database table.
         The field is also not existing in the table, it is also added to the table using Append Structure.
        Will this be possible using some Screen Exit?
    Thanks in Advance.
    Punit

    Hi Poorna,
       Thanks for the reply.
       I have to add field to the txn QM02. User will specify the value for the custom field in this txn and the same should be updated in the database table.
       The field is not a std SAP field, it is added to the table using append structure.
    Thanks,
    Punit

  • Adding field to Table Control using screen exit

    Hi Folks,
    I have a requirement of adding a field in Table control of Standard SAP transaction also updating the same in standard SAP database table.
    The field is also not existing in the table, it is also added to the table using Append Structure.
    Will this be possible using some Screen Exit?
    Thanks in Advance.
    Punit

    Hi Punit,
    There are various screen user exits(QQMA0001,QQMA0008,QQMA0010,
    QQMA0011,QQMA0012) available for this transaction but all are related to adding a subscreen.So, I am not very sure whether we can modify a table control for this transaction. So, If possible if u r requirement still can be acheived with creation of a subscreen then it would do only if the exits which were mentioned above belongs to u r main screen..
    Regards,
    Swaroop

  • Extend dynamic selection for a field added on PRPS table

    Hi Gurus,
    I want to see the field that I've added in PRPS table as part of dynamic selection on the reports like S_ALR_87013542/ S_ALR_87013532. The LDB for project systems is PSJ. How do I make it appear as a dynamic selection on the selection-screen criteria for these reports?
    Thanks...

    Hi,
    We have done this a lot on my project.  Follow these steps:
    (1) Transaction SE36 for logical database PSJ
    (2) Choose menu path Extras -> Selection views (Ctrl+F7)
    (3) Change the "Origin of view" to SAP
    (4) Find the PRPS_R node in the top, right "Tables/nodes" view.
    (5) Double-click PRPS_R.
    (6) Find your custom field that you added in PRPS (in the bottom "Table fields/node fields" view.
    (7) Choose and enter a 2-character Function Group ID (see the top, left view) next to the new field.
    (8) Save and transport...
    Best Regards,
    James Gaddis

  • New columns added in a table

    Hi,
    A table is altered to add some new information (columns, or constraints etc).
    Is there a way to check what all new columns are added to the table and at what date?
    Does Oracle Keep track of this activity some where in its Data Dictionary?
    Version od the Oracle is - 9.2.0.6.0
    Thanks,
    Vineet

    LAST_DDL date will also be updated if i do the analyze on the table.No it won't.
    SQL> create table t (n number);
    Table created.
    SQL> alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';
    Session altered.
    SQL> exec dbms_stats.gather_table_stats(user, 't');
    PL/SQL procedure successfully completed.
    SQL> select o.last_ddl_time, t.last_analyzed
      2  from user_objects o, user_tables t
      3  where t.table_name = 'T'
      4  and t.table_name = o.object_name
      5  and o.object_type = 'TABLE';
    LAST_DDL_TIME       LAST_ANALYZED
    2007-02-25 16:21:41 2007-02-25 16:22:25
    SQL>I once had a Re: ddl about whether this implied gathering statistics should not be considered DDL.

  • "Program terminated in remote system NONE: Logon failed" when adding a new table

    Hello,
    I set up a replication flow from a SAP ERP 6.0 EHP7 with SAP ASE 16.0 source to SAP HANA 1.0 rev 82 target
    I am using a standalone SLT system NetWeaver 7.0 with DMIS 2011_1_731 (with SP 1 to 7).
    I have 100 tables to replicate.
    I succeeded to set up replication for 57 tables. These tables are replicating properly.
    Whenever I try to add a new one (with LTRC transaction, Data Provisioning -> Start Replication), the new table is marked as 'Failed' after a little while.
    When I press 'Show Error Log' button I got an obscure error message:
    "Program terminated in remote system NONE: Logon failed "
    I do not understand this message. I checked both on SAP ASE source and SAP HANA target. I am still able to connect against both source and target.
    Can you please tell how to troubleshoot this error.
    Thanks in advance,
    Christian

    First thank you for answering my questions. I really appreciate your answers.
    I rechecked the documentation.
    "Application Operations Guide SAP Landscape Transformation Replication Server Document Version: 2.3 – 2014-07-08"
    Page 29 - 30
    3.5.2.2 Data Transfer Jobs
    This section explains the relationship between the number of data transfer jobs and the number of available background work process.
    Data transfer and data transformation processing on SLT server system is accomplished by the background work processes of the underlying SAP NetWeaver ABAP application server. Each job occupies 1 background work process in the SAP LT Replication Server system. For each configuration, the parameter Data Transfer Jobs restricts the maximum number of data load job for each mass transfer ID (MT_ID). In total, a mass transfer ID (MT_ID) requires at least 4 background jobs to be available:
     One monitoring job (master job)
     One master controller job
     At least one data load job
     One additional job either for the migration objects definition, access plan calculation or to change configuration settings in the Configuration & Monitoring Dashboard
    Example
    If you set the parameter Data Transfer Jobs to 04 in a configuration “SCHEMA1”, a mass transfer ID 001 is assigned. As a result, the following jobs should be in the system:
    1 Master controller job: /1LT/IUC_REP_CNTR_001
     At most 4 parallel jobs for MT_ID 001: /1LT/IUC_LOAD_MT_001_001/~002/~003/~004
    When configuring your data load or replication scenario, consider the following:
     Do not define more data transfer jobs than the number of available application server background work processes. If all available background work processes are already occupied by jobs, any other job will have to wait until a free work process becomes available. This can lead to long wait times until a new activity (for example creating triggers) can start, and can also result in significantly increased latency times for data replication.
     The number of dialog work processes in the source system corresponds 1:1 with the number of data transfer jobs in the SAP LT Replication Server system.
     Besides the work processes allocated by the data transfer jobs you need to provide additional available work processes for controller and monitoring jobs, the migration objects definition, access plan calculation or to perform configuration changes, and so on.
    Sizing for SAP LT Replication Server involves determining how many work processes are required to perform the initial load of data into the target system within an acceptable timeframe, and accomplish the change capturing and the transfer of data changes to the target system within expected latency times.
    Ensure that you add enough additional work processes to allow other required SAP LT Replication Server jobs to run.
    Finally, you map the number of required application server work processes to their system resource consumption (CPU, memory, disc space) using the formulas provided by the SLT Sizing Guide.
    With the simple formula below, you can calculate the number of required application server work processes (WPs) on the SLT Server for each active SLT configuration.
    The number of required work processes can be determined by adding
     The Number of required data transfer jobs ,
     plus one background work process for Central Master (Monitoring) Job (only one per system!),
     plus one background work process for Master Controller Job,
     plus 3-5 additional empty background work processes (recommended per configuration),
     plus approx. 3 dialog work processes (recommended for each configuration).
    Note: A lack of available free application server work processes can negatively affect the data load or data replication processes.
    To summarize everything, the number of 'Data Transfer Jobs' must be set depending of the number of source tables, it is not the actual number of tables.
    Assume that for my 100 tables I use 10 'Data Transfer Jobs' :
    - The number of work processes on the SLT server would be 20. I took the simple formula of the documentation:
    10 data transfer jobs ,
    + 1 background work process for Central Master (Monitoring) Job (only one per system!),
    + 1 background work process for Master Controller Job,
    + 5 additional empty background work processes (recommended per configuration),
    + 3 dialog work processes (recommended for each configuration).
    - The number of dialog processes on the source server would be 10 ( equal to the number of 'Data Transfer Jobs')
    Am I correct ?
    Regards,
    Christian

  • Adding an interactive table to a form?

    Okay, I am really new to using Adobe Pro and kind of brain dead with JavaScript.  I'm using the LiveCycle Designer to create a form and I want to add a table that expands as data is entered, or create a button that allows additional rows to be added as needed.  I was trying to follow a little how-to-guide I found, but after I follow the instructions my codes don't work for the buttons I created to add a row.  Please help

    Just a couple of minor changes ......I attached the updated version.
    1. The page subform that will house the table must be set to flowed ...otherwise when it reaches the bottom it will not create a new page for you.
    2. Your Table was named Table1 but you referenced it as Table in the commands hence th eobject could not be found.
    3. I moved the add row button outside of the table so that it woudl not repeat for each row.
    4. I updated the code on the delete row button to delete the row that you are on ...otherwise it woudl take the 1st occurance out.
    Let me know what you think
    Paul

  • Creating a new schema or adding some more tables in existing schema ??

    Hi All,
    We have a new requirement from the client asking us to include a few new functionalities(pages--- all together a new application has to be embedded into our application) in our application. By adding these new functionalities, the number of hits to our application can be doubled.
    As per the above requirement, I would like to know that whether to create a new schema or to create some new tables in the existing database for the new functionalities.
    By what way, can I handle the number of requests in a better way? by creating the new schema or by creating the new tables for the new functionalities.
    Also I would like like to know what kind of factors will differ between creating a new schema or creating new tables for the new functionalities in the existing schema.
    FYI... We are using Cold Fusion as front-end and Oracle 9i for back-end

    This the forum for Oracle's SQL Developer tool. You will get better answers in the Database - General forum.
    The short answer is that from a performance point of view there will be no difference. The issues are more to do with maintenance.

  • Is there any way to prevent excess rows from being added to a table on the front panel?

    Whenever I programmatically add rows through a property node I can still go into the front panel and keep adding additional rows through the table. Is there any way to prevent this "excess scrolling"? Maybe grey out the rows or something? 
    At least I have chicken

    Hello Labviewleroy,
    You should be able to right click on the table on the front panel and select
    Visible Items>>Horizontal Scrollbar or Vertical Scrollbar
    You could also consider changing their visibility programmatically using a property node for the control or indicator that you are referencing. You can create the property node by right clicking on the control on the block diagram and selecting
    Create>>Property Node>>Visible Items>>Horizontal Scrollbar or Vertical Scrollbar
    Cheers,
    -Joel
    Motion PSE
    National Instruments

  • Need suggestion on adding Index on table

    Hi,
    There is table called customer_locations in my database which has records about more then 5000 rows, When we write some select query to fetch data from this table takes too much time to load the data.
    Need a suggestion how to add index to increase the performance on this table. also which type of index to be added need a suggestion
    table sql script is mentioned below
    CREATE TABLE "CUSTOMER_LOCATIONS"
    (     "LOCATION_ID" NUMBER NOT NULL ENABLE,
         "COMPANY_NAME" VARCHAR2(512),
         "ADDRESS_LINE_1" VARCHAR2(512),
         "ADDRESS_LINE_2" VARCHAR2(512),
         "PHONE_NUMBER" VARCHAR2(255),
         "FAX_NUMBER" VARCHAR2(255),
         "CITY" VARCHAR2(512),
         "STATE" VARCHAR2(512),
         "ZIP" VARCHAR2(100),
         "COUNTRY" VARCHAR2(255),
         "CREATED_BY" VARCHAR2(512),
         "CREATED_DATE" TIMESTAMP (6),
         "MODIFIED_BY" VARCHAR2(512),
         "MODIFIED_DATE" TIMESTAMP (6),
         "DOMAIN_ID" NUMBER,
         "LOCATION_TYPE" VARCHAR2(255),
         "STATUS" VARCHAR2(50),
         "IB_STATUS" VARCHAR2(100),
         "OLD_LOCATION_ID" VARCHAR2(50),
         CONSTRAINT "SS_CUSTOMER_LOCATIONS_PK" PRIMARY KEY ("LOCATION_ID") ENABLE
    Please suggest
    Thanks
    Sudhir

    Hi Sudhir,
    Since you have no predicates it would be unavoidable to have FULL TABLE SCAN. But let me tell you that FULL TABLE SCANS are not bad.
    Just to help you with, the below code can enunciate the use of Indexes:
    drop table test_table;
    create table test_Table as select * from all_objects where rownum < 5001;
    select * from user_ind_columns where table_name = 'TEST_TABLE';
    --No rows fetched.
    explain plan for
    select object_name || ' is a ' || object_type as OBJ_DESC, object_id
      from test_table;
    --5000 Rows fetched
    select operation, options, object_name, object_alias, object_instance, object_type, optimizer, depth, position, cost, cardinality, cpu_cost, io_cost
    from plan_table;
    OPERATION               OPTIONS     OBJECT_NAME     OBJECT_ALIAS          OBJECT_INSTANCE     OBJECT_TYPE     OPTIMIZER     DEPTH     POSITION     COST     CARDINALITY     CPU_COST     IO_COST
    SELECT STATEMENT     (NULL)     (NULL)          (NULL)                    (NULL)               (NULL)          ALL_ROWS     0          19               19          5000          1698651          19     
    TABLE ACCESS          FULL     TEST_TABLE     TEST_TABLE@SEL$1     1                    TABLE          (NULL)          1          1               19          5000          1698651          19
    alter table test_Table add constraint pk_object_id PRIMARY KEY (object_id);
    explain plan for
    select object_name || ' is a ' || object_type as OBJ_DESC, object_id
      from test_table
    where object_id = 26;
    select operation, options, object_name, object_alias, object_instance, object_type, optimizer, depth, position, cost, cardinality, cpu_cost, io_cost
    from plan_table
    where statement_id = 'WITH_PK';
    OPERATION               OPTIONS               OBJECT_NAME          OBJECT_ALIAS          OBJECT_INSTANCE     OBJECT_TYPE          OPTIMIZER     DEPTH     POSITION     COST     CARDINALITY     CPU_COST     IO_COST
    SELECT STATEMENT     (NULL)               (NULL)               (NULL)                    (NULL)               (NULL)               ALL_ROWS     0          2               2          1               15543          2
    TABLE ACCESS          BY INDEX ROWID     TEST_TABLE          TEST_TABLE@SEL$1     1                    TABLE                              1          1               2          1               15543          2
    INDEX                    UNIQUE SCAN          PK_OBJECT_ID     TEST_TABLE@SEL$1     (NULL)               INDEX (UNIQUE)     ANALYZED     2          1               1          1               8171          1Let me know if it help or if you still have any concerns.
    Regards,
    P
    Edited by: PurveshK on May 29, 2012 12:40 PM

  • Adding footer in table

    Hi All,
    I want to add a footer for table in WDA. I am not using ALV. My footer will give the total of the items in the table. However, i am not able to add a footer. It also doesnt appear if i make footer visible. Please advise.
    Thanks,
    Prisford Pereira.

    >It also doesnt appear if i make footer visible.
    Are you referring to the footerVisible property of the Table UI element?  If so, this property no longer does anything.  From the online help:
    ●      footerVisible
    This property is presently not evaluated.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/6e/ae0e422dfcdc2ce10000000a1550b0/frameset.htm
    There is no built-in footer you can customize in the normal table. You would have to either added a total line to the contents of your table itself or create some UI element that appear separate from and below your Table for the output of such information.

  • Can a line be added to a table?

    I converted a very large Word document to .pdf, then made it into a Form (adding and editing form fields).  In one table, on one page, a single line in the word document table was "greyed" and thus did not appear on the acrobat form.  Is there any way of adding that single line to the table rather than go through the entire process of recreating the form after fixing it in Word? 
    It took more than an hour to do this (custome form fields) and I would hate to have to spend another hour just because a single line on a single table was missed.
    Thank You
    Mogadeet

    Are you aware that the content, the body text, is on a different layer than the from fields. So if one replaces a page the form fields on that page remain and content behind for the form layer is replaced. Now you only need to realign the form fields as needed and add a row of additional form fields. All of the scripts for the fields. pages, and document remain unchanged.

  • Adding dynamic size table to Interactive Form

    Hello everyone,
    I have a node with multiple elements that i would like to show in an interactive pdf form.
    I'm using the Adobe LiveCycle Designer to do it, but i'm only managing to bind "solo" variables, not tables.
    How can i associate dynamically a table with several lines to a pdf interactive form ? I tried a list box but i still only get the first element shown in the box. Am i doing anything wrong ?
                 Thank you in advance.
                           Nuno Santos

    Hi,
    Basically the general way to add a table to INteractive form is by adding a subform elemet to a subform element and(i mean subform in a subform), now map the fields u want to be displayed as a table.
    For the fisrt subform set the LayoutType-Flow Content,Flow DirectionTable.
    Then select the allow page breaks within the content option.
    And the binding should be Normal.
    for the second subform:
    LayoutType-Flow Content,Flow DirectionTable row.
    Now also select the option allow page breaks.
    Then for Binding tab: select the Repeat Subform for each data Item, then min count=1.
    And now if ur table columns contain names like abc, def and xyz.
    Then in the script editor code something like this
    abc[*]; under show: initilaze, language: Formcalc and Run at: client
    Hope this should work out for you.
    let me know if u have any more queries.
    Thanks,
    Lohi

  • The record is not added into the table.

    Hi,
    I am new to Hibernate.
    I have contact.hbm.xml
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="Contact" table="CONTACT">
    <id name="id" type="string" column="ID" >
    <generator class="assigned"/>
    </id>
    <property name="firstName">
    <column name="FIRSTNAME" />
    </property>
    <property name="lastName">
    <column name="LASTNAME"/>
    </property>
    <property name="email">
    <column name="EMAIL"/>
    </property>
    </class>
    </hibernate-mapping>
    And I have hibernate.cfg.xml
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
    <property name="hibernate.connection.driver_class">sun.jdbc.odbc.JdbcOdbcDriver</property>
    <property name="hibernate.connection.url">jdbc:odbc:test</property>
    <property name="hibernate.connection.username"></property>
    <property name="hibernate.connection.password"></property>
    <property name="hibernate.connection.pool_size">10</property>
    <property name="show_sql">true</property>
    <!-- <property name="dialect">org.hibernate.dialect.MySQLDialect</property> -->
    <property name="dialect">com.hxtt.support.hibernate.HxttAccessDialect</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <!-- Mapping files -->
    <mapping resource="contact.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>
    And my client program to add a record into the table is as follows..
    File f=new File("..src/com/hibernateaction/chapter01/hello/hibernate.cfg.xml");
    Configuration cfg = new Configuration().addFile(f);
    Iterator itr=cfg.getClassMappings();
    while(itr.hasNext())
         System.out.println("V="+itr.next());
    SessionFactory sessionFactory = cfg.configure().buildSessionFactory();
    session =sessionFactory.openSession();
    System.out.println("Inserting Record");
    Contact contact = new Contact();
    contact.setId("3");
    contact.setFirstName("Senniappan");
    contact.setLastName("Gounder");
    contact.setEmail("[email protected]");
    session.save(contact);
    System.out.println("Done");
    session.flush();
    session.close();
    The output displayed as "Done" and "Hibernate: insert into CONTACT (FIRSTNAME, LASTNAME, EMAIL, ID) values (?, ?, ?, ?) ".
    But there is no record is added into the DB.
    Kindly help in this regards.

    I used transaction.commit() it workd fine. Thanks Balu.
    My query is, is it necessary to start a transaction to add a single row into the table? Could u brief about this implementation?

Maybe you are looking for

  • Field VIQMSM-MATXT(14) does not exist in the screen SAPLIQS0 7204

    Hi experts, I have a BDC calls QM02 Tcode in a custom report as follow:   PERFORM bdc_dynpro      USING 'SAPLIQS0' '7204'.   PERFORM bdc_field       USING 'BDC_OKCODE'                                 '=REAK'.   PERFORM bdc_field       USING 'BDC_CURS

  • List view displayed in 2 columns

    I want to display a list view that is grouped by a field in 2 columns. Not sure how to accomplish this Cat1                       Cat 2 1,2,3,4                    1,2,3 Cat3                       Cat 4 1                            1,2

  • HP laserjet pro n1212mf won't scan

    I installed this printer over a network on my Macbook using the HP supplied CD when I was running OS X Lion.  I have upgraded to OS X Mountain Lion and I am unable to scan.  I have done Apple Software Updates.  When I open HP Scan it reports no scann

  • How much performance can I get from my macbook?

    It's older then 2,5 years but still quite good for my needs. It has a 2.16 GHz Core 2 Duo and I never use all the CPU, it has 2GB 667MHz DDR2 SDRAM and I use it all. I am not using all the 120 GB of 5400 rpm HDD but I use it often and I feel how much

  • Error when importing psd files into Premiere Pro

    I am using Adobe Premiere Pro CS4 and Photoshop CS4.  Whenever I attempt to import a psd file I get this error message:  "File format not supported".  I have tested it with different file sizes and properties.  My files are RGB and 8 bits/channel.  I