Is it possible to buffer the entire JTable for JScrollPane scrolling?

With the following code, when you scroll up and down you get lots of "called" output.
I will know when my jtable is updated, so is there
some way I can get the scrollpane to buffer the entire jtable component
so that subsequent scrolling just does drawing of the appropriate part
of the jtable from a buffered image? Note that the cells still need to
be editable (I've got cell editors). Possible? Here's the code :
public class TableBufTest {
    public static void main(String[] args) {
        String[][] data = new String[30][2];
        for (int i=0; i<2; i++) {
            for (int j=0; j<30; j++) {
                data[j] = Integer.toString(j*10 + i);
String[] columnNames = new String[] {"1", "2"};
final JLabel jLabel = new JLabel();
JTable table = new JTable(data, columnNames);
table.getColumnModel().getColumn(0).setCellRenderer(new TableCellRenderer() {
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus,
int row, int column) {
System.out.println("called");
jLabel.setText((String) value);
return jLabel;
JScrollPane scrollPane = new JScrollPane(table);
JFrame jFrame = new JFrame();
jFrame.getContentPane().add(scrollPane);
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setSize(200,200);
jFrame.setLocation(300,300);
jFrame.show();
Thanks!

Thanks.
I ended up doing a couple of things - first of all using JLabels instead of JTextFields
and then creating my own FastJLabel using the DefaultTableCellRenderer as a basis.
(I couldn't use it because I have to return different components for different rows.)

Similar Messages

  • Is it possible to display the entire list in Background ?

    Hi all,
    I have alv report(Oops) , it is grid display and having more than 300 columns , when i execute that report in background i am getting only 132 columns and 65 lines per page, Is it possible to display the entire list , If it is possible then how we can do that? if it is not what is the reason? .
    Thanks in Advance.

    Hi,
    If use Grid in BG u will get o/p In ALV List Itself, second thing is u will get Croped o/p bcos of Print Format 65255 , in this case u have to create/change a new Print Format only for BG jobs like 651000.
    for more info ask ur basis person to create a new print formats in such cases.
    Regards,
    shiva.

  • Is it possible to clear the entire Bookmarks list at one time in Safari for Windows?

    Hello. Is it possible to clear the entire Bookmarks list at one time in Safari for Windows? I would like to continue to use the Safari browser even though I have Windows 7 as the operating system on my notebook. When I try to delete bookmark entries one at a time, after deleting several, errors start popping up in the browser. Can I reinstall Safari without the Bookmarks I've built up? Please help a humbled Safari user.

    Are you sure that you can change the permissions of symlinks themselves? I think I've tried to make files read-only via symlinks on a local server but ended up using bindfs because it wasn't possible. Even if you can, symlinking everything that might be necessary for a given environment would not be ideal, plus I don't think symlinks can be used across different filesystems.
    If a real-life human can figure out if it's he/she is in a chroot and break out of it, then he/she can write a script to do the same. I want a sandbox that could run malicious code with no effect on the system (if that's possible). Also, I think if the chroot idea were truly feasible, makepkg would have been using it for years already to simply install packages in the chroot as you normally would and then package them. There would also be several sandbox applications that could run applications safely. So far I have yet to find any.
    I admit that I haven't looked into using a chroot in detail though and of course I may have missed some application which creates such a setup. Right now I think using per-application namespaces with fuse seems the most promising but I won't know until I've finished implementing a test application. If it turns out that it's a dead end I'll take harder look at chroot but it really doesn't seem to be able to do what I want.

  • In my family we have 3IPhones 4S, one IPhone5, one IPad3, one IPadMini and two IPad 4. Is it possible to use the same energieadapter for all of those ?

    In my family we have 3IPhones 4S, one IPhone5, one IPad3, one IPadMini and two IPad 4. Is it possible to use the same energieadapter for all of those ?

    Yes but the iPhone chargers will struggle to charge the iPads ,they need more power than the iPhone chargers produce and with an iPad will charge VERY slowly
    The iPad chargers whether 10w or 12 will happily charge all your devices and Apple confirms the compatibility on the relevant web page.

  • Is it possible to use the same Switch for two different clusters.

    I have 10g Rac setup on windows.
    Now I am planning to install 11gR2 on different servers.
    Is it possible to use the same Switch for two different clusters.

    user9198027 wrote:
    I have 10g Rac setup on windows.
    Now I am planning to install 11gR2 on different servers.
    Is it possible to use the same Switch for two different clusters.
    Yes.  Technically there will not be any conflict as long as the private addresses used by the 2 clusters do not collide, and provided that the switch's port capacity and bandwidth will not be exceeded.
    Your NA (netadmin) can also configure the switch to separate the 2 Interconnects from one another (called partitioning when using Infiniband) - if the switch supports such features.
    A major consideration is not to make the switch, public. That typically cause a range of problems and can have a serious impact on an Interconnect. But using 2 private networks on the same infrastructure should not have the same problems - if configured and implemented correctly.

  • Is it possible to change the search help to have Scroll capability instea

    I am using ABAP Webdynpro.  is it possible to change the search help to have Scroll capability instead of Next Page/Next line/Last line.  We would rather use a search help to do this as the user wants to have their own personal value list.

    Found the answer on SDN

  • Is it possible to change the Apple ID for my macbook pro?

    Is it possible to change the Apple ID for my macbook pro? My laptop is currently registered under my husband`s ID, and I would like to change it to my apple ID so I can install changes / updates (as we are now separated). Would appreciate any help.

    In your post you have indicated that the MBP has Snow Leopard (10.6.8) installed.  You will have to use the original OSX disk and slide it into the DVD drive on startup holding the C key.  Then you follow the instructions on the display.
    Worst case is to take it to an Apple store and have them assist you in the installation process.
    Ciao.

  • How is ist possible to maintain the time dependencies for Abap Privileges?

    How is ist possible to maintain the time dependencies for Abap Privileges?
    In our Installation of SAP IDM 7.0 SP2 Patch 4 the time dependencies of Abap Roles are imported in the IC by Initial loads Jobs. How can the see / change the dependencies in our IDM Workflow UI? Presently nothing jet is shown, no Attribute is predefined..
    Can anybody give us a hint?
    Thank you in advance !!

    If you click VIEW/SHOW PLAYHEAD INFO, you will see the timecodes as you scrub. (Consumer timecodes, not pro timecodes).
    This works if you imported your footage from a camcorder, either miniDV or AVCHD.
    However, if you have imported an analog file, or saved a DV file to a QuickTime File, you may just see the file creation date in VIEW PLAYHEAD.
    However, there is a trick to getting even these clips to display timecodes if you know the start time.
    First pick a clip. Make a copy and drag it to your desktop, just so you don't lose anything.
    Rename this copy in the following format clip-yyyy-mm-dd hh;mm;ss.current file extension.
    For example, clip-2001-07-14 09;30;45.mov (note the space between the day and the hour)
    This would be a .mov clip that starts with the first frame at July 14, 2001 at 9:30:45 AM
    Then import the clip into iMovie. You now have timecodes at the playhead.

  • My disk utility will not let me highlight jornaled in mthe drop down menu. I need to erase the entire mac for re sell purposes.

    My disk utility will not let me highlight journaled in the drop down menu. I need to erase the entire mac for re sell purposes.

    You need to be booted from another source as you cannot delete or reformat the drive you are booted from. See if you can either use the original install disks (Snow Leopard or earlier) or internet recovery (Lion or later) to boot from and then be able to use the Partition tab to partition and format it correctly.

  • Is it possible to sandbox the entire system?

    DISCLAIMER
    This is partly just thinking out loud.
    There may be some completely obvious solution for achieving this that I have not come across.
    My ideas may be flawed.
    I saw the other thread about sandboxing but that had a different focus and went in a different direction than this hopefully will.
    First, by sandboxing I mean the following:
    * let an application see the actual system, but only selectively, e.g. make /usr visible but /home inaccessible
    * intercept all writes to the system
    * let an application see all intercepted writes as though they have actually occurred
    * intercept all network communication and allow the user to approve or deny it, e.g. enable a source download from one site but prevent the application from calling home to another
    * the application cannot escape the sandbox
    * the application should not be able to detect the sandbox
    Is this possible?
    First I thought about using FUSE to mask the entire filesystem but this would affect all applications and probably wouldn't work on a running sysem.
    Then I thought about using virtualization. Maybe it would be possible to create a fake base image of the live host system and then add an overlay to that to create a sandboxed virtual clone of the host system. The network connection could probably by the host in that case.
    I don't know if it would be at all possible though to create a fake base image of the live host system. I also don't know if it would need to be static or if the image could remain dynamic. In the latter case. it would probably be possible to create the image with FUSE. Using FUSE it might even be possible to forgo the overlay image as FUSE itself could intercept the writes. There are obvious complexities in that though, such as how to present changes to a file by the host to the guest if the guest has modified it previously. I also have no idea if the guest system could use a clone of the hosts file system.
    Why I would want to do this:
    * "Safely" test-run anything while protecting your system (hide your sensitive data, protect all of your files, control network access)**.
    * Simplified package building: build the application as it's meant to be built in the sandbox, compare the sandbox to the host and then use the differences to build the package***.
    * It would be cool.
    ** Before anyone interjects with the "only run trusted apps" mantra, this would also apply to trusted apps which might contain bugs. Let's face it, most people do not plough through source code of trusted apps before building/installing/running them.
    *** This was prompted by my ongoing installation of SAGE which is built in the post-install function instead of the PKGBUILD itself due to the complexities of the build process. The general idea is to create a way in which all application that can be built can be packaged uniformly.

    Are you sure that you can change the permissions of symlinks themselves? I think I've tried to make files read-only via symlinks on a local server but ended up using bindfs because it wasn't possible. Even if you can, symlinking everything that might be necessary for a given environment would not be ideal, plus I don't think symlinks can be used across different filesystems.
    If a real-life human can figure out if it's he/she is in a chroot and break out of it, then he/she can write a script to do the same. I want a sandbox that could run malicious code with no effect on the system (if that's possible). Also, I think if the chroot idea were truly feasible, makepkg would have been using it for years already to simply install packages in the chroot as you normally would and then package them. There would also be several sandbox applications that could run applications safely. So far I have yet to find any.
    I admit that I haven't looked into using a chroot in detail though and of course I may have missed some application which creates such a setup. Right now I think using per-application namespaces with fuse seems the most promising but I won't know until I've finished implementing a test application. If it turns out that it's a dead end I'll take harder look at chroot but it really doesn't seem to be able to do what I want.

  • Is it possible to make the entire keywords hierachy export in the metadata?

    I have created the following Keyword hierarchy in Aperture:
    Location, Europe, Eastern Europe, Croatia, Dalmatia, Split
    In Aperture I only need to add the bottom level 'Split' as a keyword and when I use the search function and insert a word from any of the higher levels (e.g. Croatia) It finds my picture.
    My problem is that when I export that file the Keywords that get exported in the metadata is only the bottom level I first entered (ie Split). This is no use to me when using the files outside of aperture as I may still want to search at the higher levels.
    Is there anyway to make the entire relevant keyword hierarchy be exported within the metadata without have to go back and add all the levels myself?

    Unless things have changes, keywords are not hierarchical at all as a standard. The hierarchy in Ap is used just for managing keyword purposes only.
    So it works within Ap but not when exported. You will have to assign multiple keywords or reestablish similar scheme in whatever other app that your are exporting the image to.

  • Is it possible to display the document link for each record  in Report ?

    Hi,
         Is it possible to display the document or Image link for each master record in the Report  with the help of RSA1->Document->Master Data.
    Usefull answers are really helpfull.
    Advance Thanks for the userful answers.
    Regards,
    MRC.

    Hi  JAYASHREE PARASMAL ,
          Thanks for your valuable answers.
          Now i got the document in my Report,while executing the report through query designer as per your suggestion done on Setting Tab option.
          But i can't able to get the same thing,while i executing the Repory through WAD.
          What setting i need follow in the WAD for getting the same thing.
          Kindly give your suggestion to get the document in my Report,while i am executing through my WAD.
          Once again thanks for your helpful answer and awaiting for your suggestion.
    Regards,
    MRC.

  • Itu00B4s possible to change the Distribution rules for a order type RM01 ??

    Hi Experts:
    I need to change the settlement rule which is automatic created at the moment  that you create a Cost colector (class order RM01) transaction KKF6N..
    but when I go into KKF6N transaction and I select the "change" option and after that I go into settlement rule screen, I can´t change the distribution rule.
    I would need to change the settlement type from "PER" value to "TOT" value.. It´is possible in this kind of Cost colectors??
    Thanks and regards!
    Manuel

    Hi,
       Please note that you will not be able to change manually the settlement rule for a cost collector. 
    When you save, the system creates a settlement rule for the product cost collector.
    The settlement rule for the product cost collector always specifies the distribution rule "100% to material" and the settlement type  is always PER (periodic).
    Also refer the note 388457 in which one of the paragraph it says "As of Release 4.5, a special settlement rule is generated when you create a product cost collector (with procedure 5: delivery value for product cost collector). You cannot subsequently change this settlement rule".
    regards
    Waman

  • Is it possible to disable the screen saver for a certain app?

    Is it possible to disable the screen saver just while a certain application is running?
    The app seems to crash when the screen saver comes on.
    Just so you know, application I'm using is Hogwasher; a newsgroup reader.

    Not really. Just disable it manually when you run that application. Then, send off a bug report to the app's developer and tell him to update it for the latest Tiger. Alternatively, use another newsgroup reader.

  • Is this a possible bug on the Facebook app for iPhone?

    I tend to suffer from slight paranoia regarding security online and on my phone. I'll try to explain the worry I'm having as best I can.
    Basically, I had a personal video on my phone, (nothing horrible don't worry), but it's of a nature that would be embarrassing to be seen by other people.
    So this video was the latest thing I had recorded/taken with my phone. I went onto the Facebook app on my iPhone to post an older picture I had to my page.
    When I saw that this video was still on my phone, I panicked and worried that it could somehow get posted to my page without me actually posting it e.g. a bug whereby the last picture or video taken would go onto your Facebook without you actually selecting it or posting it. So I deleted it while still on the grid page where you choose your photos/videos and so it disappeared when I went back to the app.
    Can anyone with 100% honesty tell me one way or another if this is possible? If I haven't explained it enough let me know and I'll explain it further. Again, please be honest cos it's the best thing for me. Thanks.

    It may be in Facebook, but Facebook doesn't consider it a bug; it's the way Facebook works. If you gave the app permission to view your photos it gives Facebook access to ALL of your photos. To put your mind at ease go to your Facebook page on your computer and see if it's there.
    If you are concerned about privacy online you probably shouldn't have a Facebook page

Maybe you are looking for