JTable is display too small, after a pack() it's too height

i have a table of 5 columns and 2 rows
it is placed on a scrollpane and then in an internal frame
the result is a table that is displayed too small (height=32 == getPreferredSize().height)
if i add a pack() statement then it is displayed too big, width is ok but height =~ 500 (should be approx. 100
what to do?

thank you! i like the one-liner!
however it works only the first time, not the second time when rows are added
DefaultTableModel model;
JTable table;
String[] columnNames;
Object[][] data;
columnNames = new String[5];
columnNames[0] = "N"; columnNames[1] = "T"; columnNames[2] = "E";
columnNames[3] = "E"; columnNames[4] = "P";
data = new Object[2][5];
data[0][0] = "e"; data[0][1] = "i"; data[0][2] = "e"; data[0][3] = "-"; data[0][4] = "2";
data[1][0] = "s"; data[1][1] = "f"; data[1][2] = "s"; data[1][3] = "2"; data[1][4] = "2";
model = new DefaultTableModel(data, columnNames);
table = new JTable(model);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
// table is show with perfectheight of 2 rows
JScrollPane scrollPane = new JScrollPane(table);
internalFrame.add(scrollPane);
internalFrame.pack();
data = new Object[3][5];
data[0][0]="A0";data[0][1]="A1";data[0][2]="A2";data[0][3]="A3";data[0][4]="A4";
data[1][0]="b0";data[1][1]="b1";data[1][2]="b2";data[1][3]="b3";data[1][4]="b4";
data[2][0]="c0";data[2][1]="c1";data[2][2]="c2";data[2][3]="c3";data[2][4]="c4";
model = new DefaultTableModel(data,columnNames);
table.setModel(model);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
// still a height of 2 rows instead of 3i have the feeling that i make it too complex :-(

Similar Messages

  • ORA-01555 Snapshot too old, rollback segment  too small after flashback tab

    Hello
    Further to an update on a table in database, I realize that I have done an error and I want to come back in the state of table before this operation.
    For this I use 'Flashback table' as this command :
    flashback table 'table_name' to timestamp to_timestamp('2010-11-08 08:00:00 AM','YYYY-MM-DD HH:MI:SS PM')
    and I get this error :
    ORA-01555 :Snapshot Too Old rollback segment N° x , "_SYSSMU9$", too small
    What I can do to not have this problem ? can I avoid it ?
    Please helps .
    Regards
    Edited by: 794982 on 12 nov. 2010 05:05
    Edited by: 794982 on 12 nov. 2010 05:05
    Edited by: 794982 on 12 nov. 2010 05:06

    To set the undo retention period:
    Do one of the following:
    • Set UNDO_RETENTION in the initialization parameter file.
    UNDO_RETENTION = 1800
    • Change UNDO_RETENTION at any time using the ALTER SYSTEM statement:
    ALTER SYSTEM SET UNDO_RETENTION = 2400;
    The effect of an UNDO_RETENTION parameter change is immediate, but it can only be honored if the current undo tablespace has enough space.
    For more reference.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm

  • YouTube Time Elapsed Display Gets Smaller After Flash Update

    I recently updated my version of Adobe Flash Player to 11,8,800,94 and, since I've done this, the time elapse display in YouTube has gotten smaller in both Firefox and Chrome.  I'm using Windows 8.  How do I fix the YouTube display problem?  Thanks for any advice!

    Thanks to you both.
    Couple of things which I thought were "understood":
    UNTIL the flash update FF and youtube worked fine.
    AFTER the update they didn't.
    There have been posts like this in the past but as I said, that wasn't for THIS flash update.
    (Ok just on closing: I ticked the NEEDS MORE INFORMATION below. Don't know why, but I guess I need more information. What is it really for?)

  • Printer output incorrect/too small after upgrading to VS 2010 Crystal

    I have a Windows Form application that was originally written using .net 3.5 and the version of Crystal Reports that came with Visual Studio 2008. When the VS 2010 release of Crystal Reports came out, I upgraded the application to .net 4/VS 2010 and the new Crystal release.
    This application prints checks on blank check stock, so alignment of the output has to be very exact to print the checks correctly. It prints the reports using the PrintToPrinter() method of the ReportDocument class.
    In the original version of the program, I had everything aligned correctly in the check report. After updating the application to the latest Crystal release,but making no changes to the report itself, I noticed that the alignment of the checks report was incorrect.
    After comparing the output, I was able to determine that the new output is slightly shrunk compared to old output, almost as if it is scaling the report in some way.
    I opened the report in the new report designer and verified that all page size and margin settings were correct/the same as before, and they were. The printed output is smaller than it should be based on how the report is designed. I tried adjusted the paper size, and also tried the "Dissociate Formatting Page Size and Printer Paper Size" to see if I could somehow adjust for the scaling, but nothing I tried was successful.
    Our check printer is a HP LaserJet 5Si. During my investigation into the problem I discovered that if I printed the report to a pdf printer (PDFCreator) the resulting pdf did not have the same scaling/shrinking problem that I get when the report is sent directly to the LaserJet. I also printed a page from the pdf to the LaserJet using Acrobat Reader, and the output was as I expected it to be.
    I only seem to be seeing the scaling/shrinking problem when I send the report directly to the LaserJet. Is there some new setting that I'm overlooking that would be applying some sort of report-wide scaling? Any other ideas as to why this is happening?

    Looking for HP LaserJet 5Si at the HP website:
    http://h20000.www2.hp.com/bizsupport/TechSupport/ProductList.jsp?lang=en&cc=us&prodTypeId=18972&prodSeriesId=25478&taskId=135
    I notice that there are several different types (hm, mx, nx, ...). Also, there are different drivers, depending on the OS.
    Ensure that you are using the correct driver (hm, mx, nx, ...) for your printer and for your OS and that the driver has the latest updates from HP.
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Flash size changes to be too small after published

    Hi there,
    I have been using captivate for a while and this is my first time to have this problem.
    After I publish and upload it to Sumtotal, the window looks good but the flash player is very small.
    I set the project as 750x520 which I usually did.
    I also changed the html to SWFObjective "100%""100%"
    Anyone knows what's the problem?
    Thank you so much!!!
    Wish all a great weekend!!

    Whether I mess the code in Html or not, the flash is small always, taking up 1/4 of the window size only.

  • SAP printout too small after changing printer

    I have one problem with the report printout in SAP. Before changing printer, we will using HP LJ 6P. The printout is fine. After changing printer to HP LJ P2035, the printout is very small. Only 1/6 of the A4 paper. Anyone can help?

    This is printer driver issue. First check PLD document property to see what printer is selected.
    Thanks,
    Gordon

  • Wiki editing area too small after template customization

    We have been working with a web developer for the last 2 months and he has
    customized our wiki layout and provided the ability to order links manually
    and to create static navigation links on the page menu using Javascript.
    We are left with one bug we cannot fix:
    When we go to edit a page in one of the wiki groups, the edit box sizes to a
    maximum of about 200 pixels or 10 lines high and not the vertical height of
    the entire content area as it does in the built in apple templates. This
    makes editing text content difficult. Our developer thinks that the wiki is
    looking for the div containers of the page to be in a specific order (which
    we have changed in the customization) to set the height of the edit field.
    We would like to know where we can get information on correcting this issue
    so that the edit field fills the entire area when content or coding is being
    changed?
    Is there a file we can adjust or other method? CSS edits have not been
    successful.

    Allan wrote:
    jelly wrote:actually i feel guilty, i haven't donated whatsoever, only free time on IRC , AUR , forums ..
    That is a great way to contribute.   I have never donated any money either.
    +1
    I think some of the "guilt" (stronger word than I really wanted) came from the fact that I couldn't donate as much time as I would have liked. Hopefully that will change more in the future, but either way it's all good, whatever you can donate. If everyone donated money and no time, that might be just as bad as everyone donating time and no money. I think the important thing is to contribute however you can so we can give back to this great distro and help to ensure it always keeps going.

  • Back volume too small after permissions repair

    Obviously 220 Gigs of data have been modified, only 75 are free on my external h.d.
    Can I avoid deleting all older backups and start again from the scratch?
    Thank you!
    Peter

    The list of files or folders you can exclude depends upon how you do backups.
    Are you depending on Time Machine as your only backup? If so, then the list is pretty short. The downloads folder comes to mind, and any folder you are using to store files temporarily for sorting. I've got a couple of folders for DVD's that I'm working on. I don't let them get copied to TM. If you are running Parallels you should probably exclude the VM folders from TM because they will get added as new copies everytime you use Windows.

  • Prints too small on HP Inkjet 2800, prints too large on Adobe PDF Printer

    I have been having this problem with all Macs in my network:
    Whenever I need to print anything on my HP Inket 2800 printer, from either InDesign or Illutrator, it will print really small, even though "fit to page" is unchecked, size is at 100% and page sizes are correctly chosen. It will even ignore the Position settings (if I choose centered, it will print on upper left). If I export the PDF it shows fine and I can print perfectly through Acrobat.
    If I choose to print over Adobe PDF, I get the opposite: InDesign will enlarge everything a lot and maintain the paper size for some reason. This way, I can't use Print Booklet to generate PDF files.
    I have tried reinstalling the HP printer drivers, without success.
    Any ideas?
    Thank you.

    Just got off the phone with Adobe and found a cure.
    Open print dialog box.
    Go to Set up
    the paper size: scroll to top and select defined by driver.
    It worked for both the HP 8150 and Xerox Phaser 7700
    I'm running CS3 on Mac Intel G5 OS X 10.5.5.
    JIm

  • Firefox 22 and higher shows fonts too big or too small, sometimes on the same page. How to "fix" this annoying 'improvement"?

    Since the update *every* website displays with the fonts too big or too small. On many websites, some of the fonts are too big and some are too small *on the same page*
    This makes for a horrible browsing experience.
    I've tried setting the layout.css.PixelsPerPx to a value of 1, but all it does is make most websites fonts too small, while leaving some websites fonts too large, with many web pages having fonts simultaneously too large and too small.
    The old behavior was quite acceptable and I'd really like to restore the behavior to what it was. How can I do that? Or do i just switch to Chrome and be done with it?

    Did you even bother to read the question?
    "I've tried setting the layout.css.PixelsPerPx to a value of 1, but all it does is make most websites fonts too small, while leaving some websites fonts too large, with many web pages having fonts simultaneously too large and too small."
    This "fix" doesn't work. Hundreds of people are complaining about how their browser was broken by this "improvement". Why not address the real problem instead of telling users to apply a useless hack to fix a programming error?

  • Course displays in too small a window once it's in LMS

    We're having a problem with our Captivate courses where, once
    we've uploaded them to our LMS (GeoLearning) and launched them,
    they launch in a window that is too small and can't be manually
    resized or maximized. The window is about 30% too small, and scroll
    bars display, forcing you to either scroll or zoom out. We even
    tried publishing with "Full Screen" selected. Nothing works.
    The LMS folks told us that Captivate uses code that the LMS
    doesn't recognize. They gave us code for us to manually paste into
    the generated htm file that basically forces the browser window to
    display at a certain size (we chose the same size as our project:
    1014x713). However, this doesn't work. The window looks the same as
    it did without the code. I've e-mailed them for further assistance,
    but I was hoping that maybe someone on this forum could shed some
    light on this problem. I find it hard to believe that Captivate
    doesn't play well with LMSs.
    Has anyone else had problems with their courses launching in
    browser windows that are too small and can't be resized once
    they're in an LMS? If so, what, if anything, were you able to do to
    fix it? This is a pretty serious problem. At this point, it looks
    like the only thing we'll be able to do is tell our students they
    have to zoom out to 75% to be able to see the entire screen. Or,
    maybe we need to resize our projects, except we don't have time to
    do that now. We're launching our new LMS and courses in about 10
    days, and that's not enough time to resize the project and then
    tinker with the placement of objects on the screen.
    If anyone has any ideas, I appreciate your help! :( I'm going
    home now! Have a great weekend.
    Lisa

    Lisa, I am certain that this is a LMS problem, not a
    Captivate problem, and encourage you to keep after the LMS company
    for help. But if I were you, I would immediately start creating
    smaller Captivate projects. The size you mentioned is humongous by
    any standards I've ever heard, and it occurs to me that perhaps it
    (they) is/are so large that the size falls outside acceptable
    parameters for the LMS. Just a thought ...
    I'm just rambling now so feel free to skip this but if it
    makes you feel better - and I know it won't - I once worked for a
    web-application designer who created his company's application to
    be run
    only at 1024x768 or larger. When I pointed out that nearly
    all our customers were still using video cards supporting 800x600
    (maximum), his simplistic reply was that I should tell them to
    upgrade their equipment. He was a complete idiot.
    I have never seen a program that couldn't be designed to run
    fine in 800x600 and that would alleviate your problem (yeah, I know
    there might be exceptions, but I've never seen a legitimate one
    except those that are designed only for pod-casting).
    .

  • Photoshop resolution on Macbook Pro 15" Retina display too small

    I've just bought a Macbook Pro 15" and I'm trying to use Photoshop, but the resolution its displaying the images at for 100% are too small. I have to design for the web, so need to be intricate with detail, but I'm finding it adjusts the resolution of the image right down. (I mean you can see the image clearly, but it's too small to edit). When I look at Safari and see a web page at 100% it's clear, but the same page displayed in Photoshop CC appears 50% of the size (even though it says it's 100%)
    If I move the application window to another screen it adjusts it correctly  – leaving all the pallettes, menus and tools correctly sized as they are on the retina display
    Is there some way to adjust the way Photoshop CC displays images so it is more consistent with what you actually see?
    There doesn't seem to be any answer on the Adobe forum, so hopefully someone here can shed some light.

    quaetapo wrote:
    Well that certainly helps in terms of making the image larger – only problem is with the low resolution there's a loss of clarity and pixelisation of the image; so not the same level of quality...
    In System Preferences/Display, what resolution do you have your screen set to? Try changing that also to see if the two settings can work together. Also, since the vast majority of users (Mac or PC) don't have Retina Displays, isn't what you're seeing with Low Resolution checked in Photoshop closer to what most people will see? Remember that Apple's software, such as Safari, have been upgraded to take full advantage of the rMBP display; most other browsers, especially in Windows, haven't.
    And if you want to tinker with the rMBP's resolution even further, check out "Eye-Friendly" in the App Store.

  • The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.

     We developed a SSIS Package to pull the data From Oracle source to Sql Server 2012. Here we used ADO.Net source to pull the records from Source but getting the below error after pulling some 40K records.
      [ADO NET Source [2]] Error: The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. 
     The PrimeOutput method on ADO NET Source returned error code 0xC02090F5. 
     The component returned a failure code when the pipeline engine called PrimeOutput(). 
    The meaning of the failure code is defined by the component, 
    but the error is fatal and the pipeline stopped executing. 
     There may be error messages posted before this with more 
    information about the failure.
    Anything that we can do to fix this?

    Hi,
      Tried both....
      * Having schema type as Nvarchar(max). - Getting the same error.
      * Instead of ADO.Net Source used OLEDB Source with driver as " Oracle Provide for OLE DB" Getting error as below.
           [OLE DB Source [478]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
           [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source returned error code 0xC0202009.  The component returned a failure
    code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the
    failure.
    Additional Info:
       * Here the Source task is getting failed not the conversion or destination task.
    Thanks,
    Loganathan A.

  • After the recent update the entire browser, including menus, icons, and everything on the web page, are too small. Fonts are smaller, pics are smaller, zoom settings will not remain universal. Minimum font size will make text readable, but all pics are to

    The new update has screwed up my browser settings, I cannot get them fixed and Im pissed because my computer is an eye-sore to read until this is fixed! EVERYTHING in the browser is smaller, fonts, menus, icons, web page content, pictures, tables, etc. I have set the minimum font in the settings and the text is just to a point where it is easily readable at the maximum size setting, but all the menus and icons are still tiny and hard to read. The last version I had installed worked fine with no add-ons needed. Everything fit the screen fine and was easily readable without modification. I want this version off my PC and I want the last version I had back on but I dont know what version it was!!!!!!! ARARGGGG
    In fact, this stupid troubleshooting window that I am in filling out this form doesnt fit the page right at all, and edges of the text are cut off, so Im not even sure what some of these boxes are asking for!!

    See [[Toolbars and page content appear too large after upgrading to Firefox 3]]
    *Try to adjust the DPI setting, see http://kb.mozillazine.org/layout.css.dpi
    *Try to set the pref layout.css.devPixelsPerPx to 2 on the about:config page.
    To open the ''about:config'' page, type '''about:config''' in the location (address) bar and press the Enter key, just like you type the url of a website to open a website.
    If you see a warning then you can confirm that you want to access that page.
    If you need to increase (or decrease) the font size on websites then look at:
    Default FullZoom Level - https://addons.mozilla.org/firefox/addon/6965
    NoSquint - https://addons.mozilla.org/firefox/addon/2592

  • I just bought a new PC and I have re-installed my Adobe Creative Suite Standard on it. Software open fine. PROBLEM: The toolbars (menu stuff) appear extra-small, too small for me to read... I sent on the PC setting to try to change the display resolution.

    I just bought a new PC and I have re-installed my Adobe Creative Suite Standard on it.
    Software open fine. PROBLEM: The toolbars (menu stuff) appear extra-small, too small for me to read...
    I went into the PC settings and tried to change the display resolution. This changes the size of all  the icons (not only Adobe) but it does not solve the problem when I open an Adobe application (Photoshop or Illustrator)... The PC is run under Windows 8.1 and my display resolution is 3200x1800 (but again, when I change the settings for a smaller resolution, only the size of the icons is affected. Once I open the software, the problem is still there, extra-small toolbars...). Help!!!

    Anything before CC is not high-DPI compatible. Feel free to continue to experiment with your system settings.
    Mylenium

Maybe you are looking for