How to make a custom TableModel for ResultSet

Hi,
I am doing my University Team Project using Java and MySQL what would be the best way to implement a custom TableModel for a JTable that shows the data from the MySQL database.
I've googled it for a couple of hours but all I can really find is examples of how to add static data into the jTable.
The updating of the database through Java works fine, but I would like to show the results in a JTable.
I need help on how to implement a TableModel that uses a ResultSet to populate a JTable.
Any examples of how to make a custom TableModel or links to something that shos me how to do it would be great.
Thanks
Shazan Miah

I've googled it for a couple of hours but all I can really find is examples of how to add static data into the jTable.Then you need more googling practice on picking the appropriate keywords to narrow down a search. Words like "jtable resultset" yielded many hits. Of course I'm partial to the one I suggested that was found in the Swing forum.

Similar Messages

  • How to make a custom thumbnail for Youtube (ie. with text, borders, etc)

    Hi there,
    I'm trying to make a custom thumbnail of a video i want to create for Youtube.
    Please help.
    Mikayla

    Mikayla
    What version of Premiere Elements do you have and on what computer operating system is it running?
    Could you clarify what you want to do...is what is described in this YouTube article what you want to do?
    Video thumbnails - YouTube Help
    You say that you are "trying to make a custom thumbnail of a video.....". Does that mean that you want to
    take a freeze frame from the video as your thumbnail?''
    What kind of a project is this thumbnail to be use for HD 1920 x 1080 or 1280 x 720 or SD?
    ATR

  • How to make a custom Divider for a JSplitPane

    Hello,
    i wont to create a custom divider(i.e. with two JButtons inside), or expand the default one.
    I know, that the divider extends Container but when i call add( new JButton("...") ) i never see the button.
    What i have to do or what do i wrong.
    Sorry for my bad english folks.
    Thanks in advance
    Wolf

    JSplitPane.TOP
    JSplitPane.LEFT
    JSplitPane.BOTTOM
    JSplitPane.RIGHT
    so you can't specify DIVIDER
    Well, JSplitPane.DIVIDER is a String, which makes it look suspiciously like a valid constant to pass to addImpl. It's description in the docs is worded similarly to the descriptions of TOP, LEFT, BOTTOM, and RIGHT. Just because the documentation doesn't say you can do it doesn't mean you can't. I'd suggest trying it.

  • How to make a custom top for my Content Area?

    Hello!!
    I see www.tomatoland.com that is developed with Portal and when your click to interwievs you go to a a Content Area but you mantain the top you build in the Portal page how can i do this??
    Anyone can help me??
    Thank in advance

    This question has been answered in the Oracle Portal FAQ.
    Regards,
    Jerry
    null

  • How to create a custom measure for each level of a dimension

    Hi all!
    Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
    one or more measures.
    thanks in advance
    hope someone helps me.

    For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
    d_aben18
    n1_aben18
    n2_aben18
    n3_aben18
    n4_aben18
    herarchy:h_aben18
    cube:cubo_aben18
    measure:med_aben18
    I create this code to fetch the data to the dimension:
    TRAP ON CLEANUP
    SQL DECLARE c1 CURSOR FOR SELECT-
    total_product_id,1,'N1_ABEN18',total_product_dsc,-
    class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
    family_id,1,'N3_ABEN18', class_id, family_dsc,-
    item_id,1,'N4_ABEN18',family_id,item_dsc-
    FROM PRODUCT_DIM
    "OPEN THE CURSOR
    SQL OPEN c1
    "FETCH THE DATA
    SQL FETCH c1 LOOP INTO-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    "SAVE THE CHANGES
    UPDATE
    COMMIT
    CLEANUP:
    SQL CLOSE c1
    SHOW 'KK2'
    Then I create a cube with use compression off, and in rules sum for example.
    After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
    for that I create another program:
    VRB D_RETURN DECIMAL
    if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
    then D_RETURN = 1
    if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
    then D_RETURN = 2
    if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
    then D_RETURN = 3
    if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
    then D_RETURN = 4
    else d_return=26
    return d_return
    "SHOW D_RETURN
    cubo_aben18_med_aben18_stored=d_return
    but it doesnt work.I dont know how to put to assign or to see what I want.
    I report the measure, or I report the program, but then how can I see the values of the measure?
    thanks in advance

  • How to create a custom tag for a custom converter

    In Jdeveloper 11g, I have a project where I have created a custom converter class that impements the javax.faces.convert.Converter class. I have registered the converter with an id in the faces-config.xml file of the project, and the converter works fine by using the <f:converter type="myconverter"> tag. However, the custom converter has a field which I would like to set from the tag itself. Hence, I would like to add an attribute to <f:converter> tag if possible or create a custom tag that has the attribute.
    I have done some reserach and I found that a custom tag can be implemented: I need to create a class which extends from the ConverterTag class or javax.faces.webapp.ConverterElTag class, which I did, but I also need to create ".tld" (tag library) file which defines the tag itself.
    The part about creating the ".tld" file and registring the new tag is what I'm not sure how to do.
    Does someone know how to do this?
    thank you

    Hi frank,
    that's a good document, and it explains how to make a custom converter. I already created the custom converter, it converts a number to any currency pattern. I know java already has a currency converter, but it doesn't support Rupee currency format, and I need that format.
    My converter works, but I would like to pass the pattern of the format through an attribute in a tag. Since f:converter doesn't seem to support that, I created a custom tag which uses my converter, and it enables me to pass a pattern to the converter.
    All of that works, but I need to be able to pass the pattern as an EL expression, and it's not evaluating the expression before passing it to the converter. It just passes the whole expression as a string. I'm thinking It may be something I'm doing wrong.
    this is the tag library definition file:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.2</tlib-version>
    <jsp-version>2.1</jsp-version>
    <short-name>custom</short-name>
    <uri>custom-currency-converter</uri>
    <description>
    custom currency custom tag library
    </description>
    <tag>
    <name>CurrencyConverter</name>
    <tag-class>
    converter.Tag.CurrencyConverterTag
    </tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <name>pattern</name>
    <type>java.util.String</type>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Edited by: Abraham Ciokler on Feb 4, 2011 11:20 AM

  • How to make a good referencing for my web site

    hi. i start with muse and would like to know how to make a good referencing for my web site; thanks for your answers...

    Google and search the forum for: SEO or Search Engine Optimisation

  • How to create a "Custom Color" for highlighting? (Acrobat XI)

    March 10, 2014
    How to create a "Custom Color" for highlighting? (Acrobat XI)
    The numbers in the RGB and other fields change as various numbers are changed.
    I wanted to create a pale orange:
    Hue               13      Red      255
    Saturation   240      Green  177
    Luminosity    86       Blue     140
    I'd selected one of the orange squares in the color grid, to display the general orange area of the slider.
    I moved the slider to select a pale orange, which generated the above numbers.   Since this wasn't directly available to save to a Custom Color, I tried to  edit the numbers.  Unfortunately, the other numbers changed, making it impossible to actually create a color.
    Any suggestions would be appreciated.
    Note:  I used Techsmith's Snagit to show screen shots in a Word document.
    When I attempted to browse and upload the file, the error message said "[The content type of this image is not allowed.]"
    OK...what images *are* allowed?

    Hi Don,
    I saw Gilad answered your question in another forum post.
    Do you have everything you need at this point?
    Let me know if you need further assistance.
    Kind regards, Stacy

  • How to make saved IR available for all users

    Hi,
    I've created IR and saved it to several tabs based on search conditions.
    But they're only visible for developers.
    How to make these tabs available for all end-users ?
    Does version 4.0 support this option ?
    Thank you!

    Hi
    At present this feature is not included, although I believe it may be in 4.0. Many people have provided workarounds for this. None of which I have tried. I cannot find the original thread but here is a solution from a chap called Ruud
    >
    One way to share your saved reports with others is to 'Publish' your report settings to a few intermediate tables in your application and have other users 'Import' your settings from there. The reason for using intermediate tables is so that not all your saved reports need to be 'visible' to other users (only those that you've chosen to publish).
    Basically you have available the following views and package calls that any APEX user can access:-
    - flows_030100.apex_application_pages (all application pages)
    - flows_030100.apex_application_page_ir_rpt (all saved reports - inclusing defaults and all user saved reports)
    - flows_030100.apex_application_page_ir_cond (the associated conditions/filters for above saved reports)
    - wwv_flow_api.create_worksheet_rpt (package procedure that creates a new saved report)
    - wwv_flow_api.create_worksheet_condition (package procedure that creates a condition/filter for above saved report)
    The way I've done it is that I've created 2 tables in my application schema that are straightforward clones of the 2 above views.
    CREATE TABLE user_report_settings AS SELECT * FROM flows_030100.apex_application_page_ir_rpt;
    CREATE TABLE user_report_conditions AS SELECT * FROM flows_030100.apex_application_page_ir_cond;
    ( NB. I deleted any contents that may have come across to make sure we start with a clean slate. )
    These two tables will act as my 'repository'.
    To simplify matters I've also created 2 views that look at the same APEX views.
    CREATE OR REPLACE VIEW v_report_settings AS
    SELECT r.*
    p.page_name
    FROM flows_030100.apex_application_page_ir_rpt r,
    flows_030100.apex_application_pages p
    WHERE UPPER ( r.application_name ) = <Your App Name>
    AND r.application_user 'APXWS_DEFAULT'
    AND r.session_id IS NULL
    AND p.application_id = r.application_id
    AND p.page_id = r.page_id;
    CREATE OR REPLACE VIEW v_report_conditions AS
    SELECT r.*
    p.page_name
    FROM flows_030100.apex_application_page_ir_cond r,
    flows_030100.apex_application_pages p
    WHERE UPPER ( r.application_name ) = <Your App Name>
    AND r.application_user 'APXWS_DEFAULT'
    AND p.application_id = r.application_id
    AND p.page_id = r.page_id;
    I then built 2 screens:-
    1) Publish Report Settings
    This shows 2 report regions:-
    - Region 1 - Shows a list of all your saved reports from V_REPORT_SETTINGS (filtered to only show yours)
    SELECT apex_item.checkbox ( 1, report_id ) " ",
    page_name,
    report_name
    FROM v_report_settings
    WHERE application_user = :APP_USER
    AND ( page_id = :P27_REPORT OR :P27_REPORT = 0 )
    ORDER BY page_name,
    report_name
    Each row has a checkbox to select the required settings to publish.
    The region has a button called PUBLISH (with associated process) that when pressed will copy the settings from
    V_REPORT_SETTINGS (and V_REPORT_CONDITIONS) into USER_REPORT_SETTINGS (and USER_REPORT_CONDITIONS).
    - Region 2 - Shows a list of already published reports in table USER_REPORT_SETTINGS (again filtered for your user)
    SELECT apex_item.checkbox ( 10, s.report_id ) " ",
    m.label,
    s.report_name
    FROM user_report_settings s,
    menu m
    WHERE m.page_no = s.page_id
    AND s.application_user = :APP_USER
    AND ( s.page_id = :P27_REPORT OR :P27_REPORT = 0 )
    ORDER BY m.label,
    s.report_name
    Each row has a checkbox to select a setting that you would like to delete from the repository.
    The region has a button called DELETE (with associated process) that when pressed will remove the selected
    rows from USER_REPORT_SETTINGS (and USER_REPORT_CONDITIONS).
    NB: P27_REPORT is a "Select List With Submit" to filter the required report page first.
    Table MENU is my application menu table where I store my menu/pages info.
    2) Import Report Settings
    This again shows 2 report regions:-
    - Region 1 - Shows a list of all published reports in table USER_REPORT_SETTINGS (filtered to show only other users saved reports)
    SELECT apex_item.checkbox ( 1, s.report_id ) " ",
    m.label,
    s.report_name,
    s.application_user
    FROM user_report_settings s,
    menu m
    WHERE m.page_no = s.page_id
    AND s.application_user :APP_USER
    AND ( s.page_id = :P28_REPORT OR :P28_REPORT = 0 )
    ORDER BY m.label,
    s.report_name,
    s.application_user
    Each row has a checkbox to select the setting(s) that you would like to import from the repository.
    The region has one button called IMPORT that when pressed will import the selected settings.
    It does this by using the 2 above mentioned package procedure to create a new saved report for you
    with the information form the repository. Be careful to match the right column with the right procedure
    parameter and to 'reverse' any DECODEs that the view has.
    - Region 2 - Shows a list of all your saved reports from V_REPORT_SETTINGS (filtered to only show yours)
    SELECT page_name,
    report_name
    FROM v_report_settings
    WHERE application_user = :APP_USER
    AND ( page_id = :P28_REPORT OR :P28_REPORT = 0 )
    ORDER BY page_name,
    report_name
    This is only needed to give you some feedback as to whether the import succeeded.
    A few proviso's:-
    a) I'm sure there's a better way to do all this but this works for me :-)
    b) This does not work for Computations! I have not found an API call to create computations.
    They will simply not come across into the repository.
    c) If you import the same settings twice I've made it so that the name is suffixed with (2), (3) etc.
    I did not find a way to update existing report settings. You can only create new ones.
    d) Make sure you refer to your saved reports by name, not ID, when matching APEX stored reports and the
    reports in your repository as the ID numbers may change if you re-import an application or if you
    auto-generate your screens/reports (as I do).
    Ruud
    >
    To me this is a bit too much of a hack and I personally wouldn't implement it - it's just an example to show it can be done.
    Also if you look here in the help in APEX Home > Adding Application Components > Creating Reports > Editing Interactive Reports
    ...and go to the last paragraph, you can embed predicates in the URL.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)
    Edited by: Munky on Jul 30, 2009 8:03 AM

  • How to make warehouse field inactive for all users in all documents autom.

    Hi All,
    Can anyone pls tell me "**how to make warehouse field inactive for all users in all documents without having to do it through form setting** "for each and every user. It should be visible but inactive
    Thanks & Regards,
    Mukesh Agrawal

    Hi,
    As a work around create a warehouse SelectWH and map the mandatory acoounts as a On hold account(in chart of accounts).So there will not be any posting on this account.
    And set this warehouse as default warehouse for all users.
    So without selecting the appropriate warehouse the user can not add the document.
    I think this might resolve you issue.

  • How to make jar files availabe for deployed EJBs

    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
    classpath, but I think that shouldn't be the way. Is there somthing in the admin
    console to make jars available or do I have to insert it in the ear file? And
    if so, where do I hve to place it?
    Thanks
    Claudia

    Put the util.jar in the ear with your ejb jars - at the same level (i.e. in
    the root) - but do not include them in the manifest.xml.
    Also each ejb jar that refers to util.jar must have util.jar on its internal
    classpath in the manifest.
    "Claudia" <[email protected]> wrote in message
    news:3d537db5$[email protected]..
    >
    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
    classpath, but I think that shouldn't be the way. Is there somthing in theadmin
    console to make jars available or do I have to insert it in the ear file?And
    if so, where do I hve to place it?
    Thanks
    Claudia

  • How to make a group contacts for iphone 4s, How to make a group contacts for iphone 4s

    How to make a group contacts for iphone 4s

    Or there are apps
    https://www.google.co.uk/url?sa=t&source=web&cd=3&ved=0CEEQFjAC&url=https%3A%2F% 2Fitunes.apple.com%2Fgb%2Fapp%2Ftext-2-group-fast-sms-imessage%2Fid519077434%3Fm t%3D8&ei=WCkfUc6vE8THtQavlYCoBw&usg=AFQjCNHnoWUqJ9AMYWCadVceOkq-6Ed4Vg

  • How to make the logs captured for Z fields in ME21N/ ME22N

    Hi
    I have  devloped new tab(Screen) and added Z field in the PO header (ME21N) as per my requirement. But whenever I do changes to the perticular Z field, logs are not captured (ME21N->ENVIRONMENT-->HEADERLOG). How to make the logs captured for Z fields like standard fields. Is there any way?
    Regards
    Raj.

    HI Ranjitha
    For the data element of Z fields go to further caracteristics of tab and make change document checkbox ticked.

  • How to make a portlet unvisible for another(not Owners) Users?

    Hi all,
    I (Site-Owner) have create a little Portal-Site with any portlets.
    I want to make one or two portlets(Admin-Area) unvisible for other users. But when I create a portlet as Site-Owner, then all another users can they see.
    How to make a portlet unvisible for another users?
    Regards
    Leonid Pavlov

    You can hide and show portlets of Web providers (OmniPortlet, Web Clipping, and Java portlets) on portal pages dynamically. This functionality is controlled by security managers. The PDK provides a number of security managers. For example:
    o Group security manager: The group security manager makes the portlet appear to users who are members of a specified group, while hides the portlet for those who are not members.
    o Authentication level security manager: You can use the authentication level security manager to control access to the portlets based on the user’s authentication level. For example you may hide the portlet from public users, but display it to authenticated users.
    In addition to the security managers provided by the PDK, you can build your own security managers.
    Although OmniPortlet and Web Clipping do not expose security managers through the user interface, you can apply them by editing their XML provider definition file.
    For PL/SQL portlets you can use the is_runnable method to control whether the portlet is hidden or shown.
    Peter

  • How to make a loop run for specific period of time ?

    hello !
    i'm new to labview and could'nt found how to make a loop run for 2 sec for example, and then to exit.
    Solved!
    Go to Solution.

    Hi Hookso,
    You can do it using the different loops like While loop and For Loop. Roderic has already stated how to do it using a for loop. I have illustrated in the attached vi how to do it using a while loop and Elapsed Time function. Take a look.
    Regards,
    Nitzz
    (Give kudos to good Answers and Mark it as a Solution if your problem is Solved) 
    Attachments:
    Untitled 2.vi ‏36 KB

Maybe you are looking for

  • Assigning values to database types

    Hi I've created some types like the ones below but I can see how to assign a value to the fred_complex_obj using pl/sql. Does anyone know? Thanks, create or replace type fred_phone_obj AS OBJECT (telephone_number varchar2(20) , telephone_type VARCHAR

  • Can Mac OS 8.6 be made compatible with Windows?

    I have one of the first iMacs (8/98) that was originally OS 8.0. It's been upgraded to 8.6 with 64mgs RAM. I'm starting my own business and need to be able to access MS Window-built sites that have "Audio" icons that, currently, don't work for me. I

  • Can't install Itunes 9.2 "Newer Version of Quicktime"

    I got a new itouch last week. Worked fine. Then went to update software to new OS (maybe Apple could have put this on a brand new one instead of older OS?!). Message said i needed Itunes 9.2. Went to update and got error "newer version of quicktime i

  • Airport Extreme and a T1?

    I am fairly new to the world of Apple. I am actually an administrative consultant working for a man who is changing over his office from PC to Mac. Today, we had a T1 installed and the tech plugged it in to our old Netgear router. When a call came th

  • Which switch model for more than 4 10G-Ports?

    we have a little network (100 clients, 1 VMware-Cluster with 2 Hosts, 1 Storage) and we want to replace old switches. we want to connect 4 cisco catalyst 2960X to core switch with 10G, and 4 2960X with 1G. Core switch is main routing instance for all