Want to resize JTable after run programe by mouse

I want to resize JTable by mouse after run programe.
(want to resize Jtable anytime)
please help me. thank you

You cannot do that directly, you can only cause the container which holds the JTable to change size. As long as that container has a LayoutManager like BorderLayout then the JTable will resize with the container (Like a JFrame)

Similar Messages

  • JasperReport errors after running program

    Guys help out here.
    Here is my program and the erors if you can see what wrong please help.
    import java.io.*;
    import java.io.FileWriter;
    import java.sql.*;
    import javax.swing.*;
    import java.util.*;
    import java.util.Map;
    import java.util.HashMap;
    import java.sql.SQLException;
    import net.sf.jasperreports.engine.xml.*;
    import net.sf.jasperreports.engine.util.*;
    import net.sf.jasperreports.view.JasperViewer;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.xml.JRXmlLoader;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.design.JasperDesign;
    import net.sf.jasperreports.engine.JasperCompileManager;
    class jasperExample
    public static void main(String[] args)
    System.out.println("Hello World! for Jasper Example.");
    JasperDesign jasperDesign = JRXmlLoader.load("samke.xml");
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
    Map parameters = new HashMap();
    parameters.put("Tittle","Test JasperReport");
    Connection con1 = DriverManager.getConnection("com.mysql.jdbc.Driver","root","');
    Statement s1 = con1.createStatement();
    JasperPrint report = JasperFillManager.fillReport(jasperReport, parameters,con1); JasperExportManager.exportReportToPdfFile(report,"report1.pdf");
    catch(JRException e)
    System.out.print("Error couldn't find the connection.");
    These are errors
    C:\celsoft\reports\vision>javac jasperExample.java
    C:\celsoft\reports\vision>java jasperExample
    Hello World! for Jasper Example.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/di
    at jasperExample.main(jasperExample.java:32)

    can any one help me in
    generating a custom xml report template file in JasperReports.
    this xml file, have to be used in JasperDesign class

  • 1424 does not pass diagnostic​s after running program

    Hello, we are using the PCI-1424 card with a Dalsa linescan camera, and are having trouble trying to do ring acquisitions with different buffer sizes. The camera either times out or always returns the number of lines that it is first set to, ie; if the original number of lines is 100, and the number of lines is then set to 1000 (and confirmed using imgGetAttribute(DisplaySid, IMG_ATTR_ACQWINDOW_HEIGHT, &nBufSize).
    I've noticed that the 1424 board does not pass 2 of the diagnostic tests in MAX. The details it returns are:
    Advanced Control Circuitry failed
    Configuration could not be written to when Confwren bit was set. [F1.5]
    Timing Circuitry failed
    Counter configuration could not be loaded. [T1.0
    Is this a programming error on my part? I am closing the session and the interface, which in my opinion should be all that is needed to reset the board to the default settings. This does not work, even the snap acquisition in MAX fails.

    I'm not surprised at the behavior that you are seeing. When the acquisition is started the board is programmed with the acquisition size and when you change that it has to reprogram the board while it is acquiring, so either it will timeout or it just won't do it and you will only see the first size. I'm not sure why the diagnostics are failing but it sounds like you can reboot and that resolves the issue. I would recommend looking into a couple of alternatives. Variable Height Acquistion uses a hardware signal to indicate how many lines should be in an image. If you didn't have a signal you could generate one with a DAQ card or you could programmatically assert
    and deassert one of the trigger lines on the 1424 but that would not be the most accurate depending on your line rate. The other alternative would be to set the image size to the largest size and then just crop the images.
    JR A.
    Application Engineer
    National Instruments

  • HELP - ABAP Program Cancelled After Running for 2.5 Hours in Background

    I have an ABAP report program that was being tested in our QA system and it died after running for 2.5 hours with the status of "Cancelled" (which, I assume, means it was terminated by SAP for exceeding some type of governor).
    I ran Code Analyzer and no performance issues were recognized.
    I am running several SELECT statements during program execution.  These are a list of all the SELECT statements used in my program.  Also, I'm using PNPCE to get a list of pernrs for which to pull data at the beginning of the program.
    SELECT *
          FROM pa0167
          WHERE pernr EQ gt_selected_pernrs
            AND bplan IN s_bplan
            AND begda LE pn-endda
            AND endda GE pn-begda.
              SELECT SINGLE fgbdt fasex
                INTO (lv_dob, lv_gender)
                FROM pa0021
                WHERE pernr EQ gt_selected_pernrs
                  AND subty EQ <fs_dtyxx>
                  AND objps EQ <fs_didxx>
                  AND begda LE pn-endda
                  AND endda GE pn-begda.
      SELECT SINGLE agency ansvh
        INTO (p_agency_out, lv_ansvh)
        FROM pa0001
        WHERE pernr EQ p_pernr_in
          AND begda LE pn-endda
          AND endda GE pn-begda.
      SELECT SINGLE vorna nachn gbdat perid gesch
        INTO (gt_control_table-fname, gt_control_table-lname, gt_control_table-dob, gt_control_table-mskssn, gt_control_table-gender)
        FROM pa0002
        WHERE pernr EQ p_pernr_in
          AND begda LE pn-endda
          AND endda GE pn-begda.
      SELECT SINGLE perid
        INTO (lv_ssn)
        FROM pa0106
        WHERE pernr EQ p_pernr_in
          AND subty EQ p_subty_in
          AND objps EQ p_objps_in
          AND begda LE pn-endda
          AND endda GE pn-begda.
      SELECT SINGLE smoke
        INTO (p_smoker_out)
        FROM pa0376
        WHERE pernr = p_pernr_in
          AND begda LE pn-endda
          AND endda GE pn-begda.
      SELECT SINGLE state pstlz zcounty
        INTO (p_state_out, lv_zip, p_county_out)
        FROM pa0006
        WHERE pernr EQ p_pernr_in
          AND begda LE pn-endda
          AND endda GE pn-begda.
      SELECT SINGLE werks btrtl
        INTO (lv_werks, lv_btrtl)
        FROM pa0001
        WHERE pernr EQ p_pernr_in
          AND begda LE pn-endda
          AND endda GE pn-begda.
        SELECT SINGLE region
          INTO (p_region_out)
          FROM zpat_county_code
          WHERE county EQ p_county_in.
          SELECT SINGLE pernr
            INTO lv_pernr
            FROM pa0002
            WHERE perid EQ gt_cobra_table-l_essn.
      SELECT SINGLE eecst ercst
        INTO (lv_eecst, lv_ercst)
        FROM t5ubi
        WHERE barea EQ '01'
          AND bplan EQ lv_bplan
          AND bcost EQ p_bcost_in
          AND cstv1 EQ '0001'
          AND smoke EQ p_smoker_in
          AND begda LE pn-endda
          AND endda GE pn-begda.
        SELECT SINGLE kwert
          INTO lv_kwert
          FROM t511k
          WHERE molga EQ '10'
            AND konst EQ 'ZCOB1'
            AND begda LE pn-endda
            AND endda GE pn-begda.

    The screen shot the tester sent me only says that it was canceled.  However, the log shows the following:
    09/17/2008 16:54:32 Job Started
    09/17/2008 16:54:32 Step 001 started (program ZBNI001...
    09/17/2008 19:22:09 ABAP/4 processor: DATASET_NOT_OPEN
    09/17/2008 19:22:09 Job cancelled
    I'm not sure it was an error, per se, but maybe SAP canceled it because it had been running too long?  The "DATASET_NOT_OPEN" is curious although I've no idea what it means.
    Thanks for your help.

  • Format changing after running the concurrent program for indentation

    I have got an issue regarding indentation in rtf template. Actually in the template I have indentation or numbering in one format like david but after running the concurrent program in the temlate output I am getting the numbering in Latin letters. like
    can anyone please send me the resolution for this issue.
    Thanks and regards

    What is the application release?
    If you are on 11i, please make sure you have (Patch 8198363: INDENTATION PROBLEM WHILE GENERATING RTF OUTPUT USING RTF TEMPLATE) applied and check then.

  • ABAP Program gives error after running  successfully for few days / months

    I have a problem that sometimes my programs start giving errors or does not run at all after successfully running for few days / months.
    But, when I copy the same program with a different name (without any changes ) it starts running again.
    Yesterday I had another problem. I was sending a request to be transported to Production Client, and the request was not getting transported. But when I changed just the name of the program, It was transported to Production Client.
    I can't understand where the problem lies and what happens to the programs after running successfully for few days. All I have to do is just copy that programm into another name and it starts running.
    Can anyone help me?
    SK Daniel

    about the transport thing..i had the same problem few months back the reason was,  i included a table which is having different package  from my program..so wot im thinking is when you creating a different program u might be assigning different package to this new program  and this package is same as all the tables included in your program...

  • When i try to install a program in my macbook Pro, the message appear: Run preflight scrip and after Run the postflight script. How i'll fix this?

    When i try to install a program in my macbook Pro, the message appear: Run preflight scrip and after Run the postflight script. How i'll fix this?

    Here are the Mac requirements:
    System Requirements Mac Version (*)
    Mac OS X 10.6.1, 10.7.1, 10.8.1 or 10.9.1
    1.83 GHz cpu or better
    Nvidia Geforce 8600, ATI Radeon X1600 or better (min 256 MB VRAM)
    1 GB RAM
    2 GB free hard drive space
    DVD-ROM Drive
    Are you sure that you have the Mac version, as there is a Windows version, as well as a few game console versions.
    Sounds as though that may be a Windows or other version.

  • HP4275A can not pass self test after running the labview program

    I am using Labview to control HP4275A LCR meter. The Labview program is just the instrument driver for the HP4275A, and it works great. Before running the program, the instrument can pass both Open and Short test perfectly. But after running the program, it can not pass self test, neither Open nor Short. I don't know why?? Is it relative to my Labview program??

    Thank you so much for your help. Yes, the instrument is in Local after running the instrument driver. In normal Open self test, just choose Capactiance as the Display A, and leave the four output terminals open then press the Self Test button. The Open self test will start and "OP" will be shown in the DIsplay A window, after 2 seconds, the open test will be finished. If something abnormal, the number of the abnormal step is displayed in Display A. Similar with the Short test.
    The problem I had was: before running the instrument driver, the self tests pass; but after running the instrument driver, the Open and Short test show abnormal, Open test is abnormal at step 17, and Short test is abnormal at step 24.
    And the instrument driver is only write commands into the instrument and then read back measuring values from it. Nothing else. So I am not sure if the problem is my instrument driver.
    The weird thing is the problems happened several times and then if I do the Open and Short self test again after running the instrument driver, both pass. I am not sure whether the problem will come back or not.
    Ia there any help??
    Big thanks

  • After running Malwarebytes & it removing/quarantine threats, Firefox works & loads slow along with other programs. Videos are now really slow also.

    I downloaded Malwarebytes to run a scan of my system. After it had detected some threats, It removed/quarantined all the threats it had found. I use Firefox & have been happy with it & have the latest version - 25.0.. I have since uninstalled it but my system loads very slow & all programs are affected including videos, etc.. The system was fine before this was done.

    I have/had this exact problem -I just restored everything that Malwarebites "quarantined" (an option within the program), and it honestly seems better already. My wireless network connection was even restored and is working well again (after running Malwarebites the connection wouldn't automatically connect after sleeping as it did before).
    My guess is, Malwarebites isn't so good at differentiating good from bad.
    I've only been running the PC for about 20 minutes since restoring everything, but I've noticed improvements in everything (especially boot up). I'll update this if my results change, but as of now it seems to have fixed the problem.
    *update -after restoring the quarantined items and removing the program from my PC everything seems to be running at it's original speed. Firefox, Photoshop, and Dreamweaver are all opening and running at near instant speeds (as they originally did).

  • After running a BDC program in background, next

    After running a BDC program in background, next
    day morning when you see the results, few records
    are not updated(error records). What will you do
    plx explain clearly

    In that BDC u have to process like this .
    1.call transaction
    if sy-subrc ne 0.
    get the records.
    2.Create a new Session with Failed records , So u can process there after.

  • My MAC Mini requires reentering password after an unspecified time and running programs are interrupted

    My MAC Mini at unspecified times switches to require reentering the password  and running programs are interrupted.
    I do not find a way in Preferences to correct this.  Software  OS X 10.9.5 (13F34)

    From the menu bar, select
               ▹ System Preferences... ▹ Security & Privacy
    If there's a closed padlock icon in the lower left corner of the preference pane, click it and enter your login password when prompted.
    Click the Advanced button and, in the sheet that opens, uncheck the box marked
              Log out after … minutes of inactivity

  • Context Menu Items Gone After Running "cleaner" program. Help...

    So with the whole Flashback/Flashfake thing I paniced (stupid on my part) ran a virus program called VirusBarrier Express and ran CCleaner (again, stupid me). Hoping I would clear off unused or harmful files I apparently in the process messed up my context menu. Items that were previously in the context menu are now gone. I did as much reading about possible fixes as I could and this is where everything stands.
    Not every item in the image  below was at the botton of the context menu, but iPack certainly was as well as various other menu items that have since dissapeared.
    While searching the internet I came across a suggestion leading me to "library/Contextual Menu Items" and when I followed that directory for both my user and system I couldn't find a Contextual Menu Items folder. There wasn't any. I've had this "missing file/folder" problem before with preference files; just a side note.
    I created the folder manually and restarted with no change at all.
    Obviously I accidentally deleted something that shouldn't have been deleted. Is there any way to get back those missing items?
    Any help is highly appriciated.

    Thank you everybody for your input and advice! I've deleted the virus software, but if I use any in the future I'll be sure to have only one installed. I initally downloaded multiple ones, but only ran one (VirusBarrier).
    I restored from a Time Machine backup with the help of Apple tech support to before I ran CCleaner (never running something like that again) and the problem fixed itself.
    I will have to be far more wary of running programs in the future. Thank you again for everybody's input and advice!
    (below is what it looked like, or kind of like, before.)

  • Program Compatibility Assistant popping up after running and closing .EXE flash created by adobe cap

    I am using windows 7. I have a .Exe flash file created using Adobe Captivate. I have closed the file after running it successfully.  Then this message popped up.
    Why this message is coming even after successful playing of flash? Is there any way to avoid this?

    Hello there,
    Are you using Captivate version 5 or 5.5? Do you know the version of Flash Player Installed? I have not seen this message appear any time, can you please confirm in one more machine? What flavor of Win 7 do you have?

  • Window changes size after running - Bug?

    I have been having an issue (a mildly infuriating one) where my window size changes after running. See images
    The window expands by the size of the scroll bars in the x and y axis. It only happens sporadically - I can't figure out a way to predict when it will happen or not.  I'll just be running/stopping the program and then bam! different front panel size.  I've also had it happen on multiple different machines with multiple different programs.  There was no code in any of the programs that resized the FP window.  I know I can force the runtime size with VI properties, but...

    I gutted the linked vi (with notes on what was changed) and attached it if you want to try and reproduce it.  After some more playing around with it, I realized it is any time I first open the VI and run it.  It seemed random because the VI was part of a project and I was frequenly opening / closing / running etc.
    Resize.vi ‏109 KB

  • How can i add rows to a JTable at run time ??????

    hi there
    how can i add a row to a JTable at run time? and display the table after the change? thank you.

    For adding or removing the rows from the JTable, you have to use the methods on the table model. I would show you a simple implementation of table model.
    public class MyTableModel extends AbstractTableModel {
    private ArrayList rowsList = null;
    private String [] columns = { "Column 1" , "Column 2", "Column 3"};
    public MyTableModel() {
    rowsList = new ArrayList();
    public int getRowCount() {
    return rowsList.size();
    public int getColumnCount() {
    return columns.length;
    public void addRow(MyRow myRow) {
    //MyRow is any of your object.
    public void removeRow(int rowIndex) {
    fireTableRowsDeleted(rowIndex, rowIndex);
    public Object getValueAt(int row, in col) {
    MyRow currentRow = (MyRow)rowsList.get(row);
    switch (col) {
    case 0:
    //return the value of first cell
    case 1 :
    //return the value of second cell
    case 2 :
    //return the value of third cell
    }Then create the table using the TableModel using the constructor new JTable(TableModel) and then when you want to add/remove a row from the table, call myTableModel.addRow(MyRow) or myTableModel.removeRow(rowIndex)....I hope that this solves your problem.

Maybe you are looking for

  • HT201209 How to use an Itunes Gift Card

    We entered our Itunes gift card code and it is showing that we have a $50 balance.  However, when we try to purchase music, the charge is still going to my credit card.  How do we resolve this problem?

  • Customization step for in  New Plant  in production planning.

    Dear Experts, Thanks for your continues support from SCN. My company having one of the production process unit. Already some plants (1000 ) are assign the process order customization. But currently include  one additional plant  ( 1001) for process m

  • I am trying to install Lion OS X over Mac OS X Snow Leopard 10.6.8

    I am trying to install Lion OS X over Mac OS X Snow Leopard 10.6.8 I get an error message: "There are currently other logged in users who must be logged out before you install Mac OS X". I switch to log out other users and deleted everyone listed. It

  • Inventory not updated

    I have RME 4.3.1 and some devices never collected/ no longer updated. the error I got from inventory collection job "Transport session to device failed. Cause: Authentication failed on device." but I didn't see any Authenication failure including run

  • 2 new and strange things when sending attachments

    Hello, I can't isolate what caused any change but suddenly on my computer at my office, when I try to add an attachment, with no body copy, it will not show. I am forced to type at least 1 letter in the body for the attachment to appear when I upload