How to do a MyScrollBarUI with Windows XP Look'n Feel?

I am having a simular issue as the one posted in this thread:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=435791
However I am overriding the paintTrack and paintThumb methods of BasicScrollBarUI and attached my own mouse listeners because I have creatd a "zoom" scrollbar. The zoom scrollbar has handles drawn one each end and when they receive a drag event, the component zooms the area.
All this is working fine except when the laf is Windows XP style, I can not get the new look because com.sun.java.swing.plaf.windows.XPStyle is package private.
In the thread above I see that the table cell render was replaced but saved to do the drawing.. Is there a work around for scrollbars thumb and track. Also my buttons on the ends do not get the new look.

I am having a simular issue as the one posted in this thread:
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=435791
However I am overriding the paintTrack and paintThumb methods of BasicScrollBarUI and attached my own mouse listeners because I have creatd a "zoom" scrollbar. The zoom scrollbar has handles drawn one each end and when they receive a drag event, the component zooms the area.
All this is working fine except when the laf is Windows XP style, I can not get the new look because com.sun.java.swing.plaf.windows.XPStyle is package private.
In the thread above I see that the table cell render was replaced but saved to do the drawing.. Is there a work around for scrollbars thumb and track. Also my buttons on the ends do not get the new look.

Similar Messages

  • How to do a TableCellRenderer with Windows XP Look'n Feel ?

    In my application i use a sortable JTable view. In order to visualize the sorted column selected by user interaction i wrote my own TableCellRenderer implemantation to feature this with an icon in the table header which shows an arrow symbol for ascending or descending sort order. In addition to that i installed a handler which underlines the header label when the user hovers over a header column with the mouse. This all works perfectly but now i challenged the following problem: The application works in a Microsoft Windows XP environment and uses the corresponding XP Look'n Feel (available since Java SDK 1.4.2). The entire application makes uses of this specific
    Look'n Feel but as i use a userdefined TableCellRenderer the table outlook is the one of the 'old' default windows Look'n Feel not the one of Windows XP. If i use the default renderer all looks what it should look like but the enhanced sorting and hover capabilities get lost.
    My question: How do i combine the xp look with my enhanced table header features ?
    I had a look at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI and there's an embedded inner class named XPDefaultRenderer which makes use of the xp skinning technology and paints the correct xp like border. Unfortunately this class is declared private and the com.sun.java.swing.plaf.windows.XPStyle which is being used inside is package private. So no chance to implement a userdefined swing component that features the xp Look'n Feel.
    Is this whole thing organized like that to fulfill copyright restictions in relation to the xp Look'n Feel which should stay unmodified ? Or is there another chance to get the userdfined renderer to feature the correct Look'n Feel ? At the moment the table header doesn't fit in the Look'n Feel at all which is annoying. Is there a solution ? Please help if you know any possible way to solve this. Thank you.

    Just a followup on the missing mouse-over effect and the bad sizing of
    XP table headers in 1.4.2. These problems are covered by bug reports:
    http://developer.java.sun.com/developer/bugParade/bugs/4855121.html
    http://developer.java.sun.com/developer/bugParade/bugs/4774013.html
    Both of these bugs will be fixed in 1.5. Here is a workaround you can
    use for 1.4.2.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import com.sun.java.swing.plaf.windows.*;
    public class XPTableHeaderRenderer extends DefaultTableCellRenderer
                           implements MouseListener, MouseMotionListener {
        private JTableHeader header;
        private DefaultTableCellRenderer oldRenderer;
        private int rolloverColumn = -1;
        public XPTableHeaderRenderer(JTableHeader header) {
         this.header = header;
         this.oldRenderer = (DefaultTableCellRenderer)header.getDefaultRenderer();
         header.addMouseListener(this);
         header.addMouseMotionListener(this);
        private void updateRolloverColumn(MouseEvent e) {
         int col = header.columnAtPoint(e.getPoint());
         if (col != rolloverColumn) {
             rolloverColumn = col;
             header.repaint();
        public void mouseMoved(MouseEvent e) {
         updateRolloverColumn(e);
        public void mouseEntered(MouseEvent e) {
         updateRolloverColumn(e);
        public void mouseExited(MouseEvent e) {
         rolloverColumn = -1;
         header.repaint();
        public void mousePressed(MouseEvent e) {
         rolloverColumn = -1;
         header.repaint();
        public void mouseReleased(MouseEvent e) {
         updateRolloverColumn(e);
        public void mouseClicked(MouseEvent e) {
        public void mouseDragged(MouseEvent e) {
        public Component getTableCellRendererComponent(JTable table, Object value,
                                     boolean isSelected, boolean hasFocus,
                                     int row, int column) {
         JComponent comp =
             (JComponent)oldRenderer.getTableCellRendererComponent(table,
                                              value, isSelected,
                                              hasFocus || (column == rolloverColumn),
                                              row, column);
         comp.setBorder(new EmptyBorder(3, 8, 4, 8));
         return comp;
        public static void main(String[] a) throws Exception {
         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         JFrame f = new JFrame();
         JTable table = new JTable(5, 5);
         f.getContentPane().add(new JScrollPane(table));
         if (System.getProperty("java.version").startsWith("1.4.2")) {
             // Replace the XP renderer with our own
             JTableHeader header = table.getTableHeader();
             TableCellRenderer renderer = header.getDefaultRenderer();
             String name = renderer.getClass().getName();
             if (name.equals("com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer")) {
              header.setDefaultRenderer(new XPTableHeaderRenderer(header));
         f.setBounds(100, 100, 200, 200);
         f.setVisible(true);
    }Cheers,
    /Leif

  • PushButton with Windows XP Look and Feel

    Hi all,
    I am looking for a way to give my buttons in my Oracle Forms 10gR2 (with Sun JPI 1.5) a Windows XP look and feel. In my formsweb.cfg I can choose between a generic and an oracle look and feel. The generic look and feel claims to have the windows look and feel, but unfortunatly, this is a Windows 3.11 L&F. Because of the overall look and feel of the Oracle L&F we decided on using this L&F but we would like our buttons to look like other buttons in Windows XP. I think this can be done by building a specific java implementation class but I have no experience with this.
    Did anybody already build such an implementation class and willing to share it with me?
    Thanks in advance,
    Harold

    The only way to accomplish this is with a Java Bean or PJC. Refer to the Oracle Forms Demos for some examples of what can be done with Beans and PJCs. Also, refer to the following page:
    http://forms.pjc.bean.over-blog.com/categorie-450786.html
    Forms Demos on OTN:
    http://www.oracle.com/technology/sample_code/products/forms/index.html
    One other suggestion would be to use:
    LookAndFeel=oracle
    colorScheme=blaf
    This will not resemble XP, but does offer a more professional looking application over the standard colors. BLAF was originally created for Oracle Applications, but works in all versions of Forms 6i and newer. BLAF = Browser Look And Feel

  • How do I install itunes with Windows 7?

    how do I install itunes with Windows 7?  I always get a Windows Installer error or administrator error __

    Have tried: download but do not install iTunes, then turn off virus protection and firewall, restart computer, login as admin, then run the iTunes insallation.  After it installs, restart virus protection and firewall and logout and back in as standard user.
    Windows leaves installers running or still resident which conflict with the iTunes installer.

  • How do i install indesign with windows 8 on a pc

    how do i unstal indesign with windows 8 on a pc?

    Visit this page please: http://www.adobe.com/products/indesign/buying-guide.html and then on the right hand panel of the page you will find InDesign Annual plan to Join Adobe Creative Cloud to leverage the most updated features of InDesign CC. When you've purchased it, you'll be able to download the software through Adobe Download Assistant as a electronic download that you can save to your desktop or any other location. You can then doubleclick the installer executable to proceed with installation and activation later on as the installation completes. If you're having another version of InDesign (older version ) then please let me know if you already downloaded the installer and then waiting to install it on your Windows 8 PC.

  • How to open pages documents with windows vista

    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    Id appreciate any help!!! thanks!!!!!

    beckstarr wrote:
    Does anyone know how to open pages document with windows vista? i saved it onto a usb stick but when i tried to open it on the computers in my university which support windows vista, it didnt reconise the file and opened with a page of question marks!!!! Im panicking now!!!!!
    You cannot open it on Windows Vista. The only application in the world that opens a Pages document is Pages, and it is Mac OS X only.
    Your options:
    1. Find a Mac with Pages installed, and save the document as doc or pdf, which you can open on Vista.
    or, if that is impossible,
    2. Open the files in a texteditor like Notepad.exe on Windows and try to piece text fragments together to get at least part of your original text back. The images should also be available somewhere, even though all formatting is gone.

  • HT1600 how to connect appel tv with windows 7?

    HI how to use appel tv with windows 7???

    Turn on home sharing in iTunes and stream (same network and apple id).  If you want to mirror your pc you need a programme like reflectorapp or airparrot (www.airparrot.com) to do it, a third party app.
    regards
    jules

  • How does adobe encoder work with windows 8?  I can't get it to work.

    How does adobe encoder work with windows 8?  I cant get it to work.

    Flash Media Live Encoder doesn't work with Windows 8.
    The best it gets is Windows 7 64 bit.

  • How can I run MP350 with Windows 8.1 computer? Works OK with Windows 7 machine. Need drivers.

    How can I run MP350 with Windows 8.1 computer?
    It works OK with Windows 7 machine, using drivers from original CD.
    Windows 8,1 machine doesn't find those drivers (which I copied to its C drive).
    It doesn't find needed drivers on the internet.

    Hi Larry-R,
    I see that you made a later post regarding this.  Please refer to the answer on that post regarding your inquiry.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • I currently have a PC with Windows Outlook.  If I add an iPad to the mix, how does the iPad interface with Windows Outlook?

    I currently have a PC with Windows Outlook.  If I add an iPad to the mix, how does the iPad interface with Windows Outlook?

    Isn't Outlook simply an email client or a software application on a computer? You can add an email account - whatever email provider that you use - right on the iPad. You can sync your Outlook contacts and calendar if that is what you are asking about, but Outlook itself has nothing to do with the iPad.
    Message was edited by: Demo

  • SSHR reskin AKA 'How to Use Adobe Flash to Transform the Look and Feel...

    There was a presentation at the OHUG 2011 Conference titled 'How to Use Adobe Flash to Transform the Look and Feel of Oracle HR Self Service'. It presented a method of 're-skinning' SSHR to present a different UI to the user.
    Looking for anyone out there that has attempted to apply this to their Oracle HRSS pages. I know this company has developed (is developing?) a product based on this approach. I want to see if anyone has done it on their own and would be willing to share some details.
    Follow-up question. Has anyone availed themselves of the bespoke UI Development based on this approach from Applaud Solutions (as mentioned on their website), and care to comment on your experience?

    Any update on this please? Even we are looking for some pointers in this area.

  • How do i find ITunes with windows 8. i went to the website to download itunes and it says thank you for downloading but i can not find it in my computer

    I have gone to itunes and downloaded it for my computer. My computer runs windows 8. the web site tells me thank you for downloading but my computer doesnt not have it nor can i locate it. it didnt even ask for my permission like it does with everything else that i download. Question is how to I get it with windows

    Try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • HOW TO DUAL BOOT W540 with windows 8.1 / 7

    I got my W540 recently with windows 8.1 pro on it. but as all engineers worst nightmare windows 8 has hard time with engineering softwares (for my case TIA Portal for  PLC programming software which only support windows 7). so i need to have a windows 7. i prefer to keep my windows 8 and have dual boot system with windows 7 added. But i can't install windows 7. initially due to disk type (GPT), then i changed it to MBR without losing my files (which only was possible if i had deleted the recovery partition- now my recovery is on my flash drive). But there are already 4 partitions on the system (1 for C: drive and 3 for recovery and system files which came originally with the product) , how can i install a windows 7? i can't add another partition because that makes my disk a Dynamic disk (which i don't really know what is). all in all, i really need windows 7 on my system ASAP.  If anyone know how to fix this please reply. Thanks guys.
    Solved!
    Go to Solution.

    You are limited to four PRIMARY partitions on an MBR disk.
    But other than the "active" partition (i.e. the small 100MB "system reserved" partition where Boot Manager is placed from doing a cold Windows install on an empty drive, or the 1.4GB equivalent Boot Manager partition that Lenovo provides along with other tools and utilities), all other partitions on the drive can be "logical".  They are not required to be PRIMARY, although Lenovo delivers its partitions that way.  But you can change that.
    You can have up to 120 LOGICAL partitions on a drive (all of which live inside an originally PRIMARY partition which gets converted to an "extended partition" which houses all of the logical partitions.  So if you have at least one logical partition (and thus have to give up one primary partition in order to build that required "extended partitions"), that means you can have up to three remaining primary partitions and up to 120 logical partitions... all on an MBR disk.  No "dynamic", and no GPT.
    Yes, that means even the Windows system partition itself (i.e. "C") can be on a LOGICAL partition.  It's only that one "active" partition (where the BIOS goes to find Boot Manager and its menu, and kick off the rest of the system boot process) which truly must be PRIMARY.  That's the only requirement.
    So, if you want to use MiniTool's Partition Wizard to carve out sufficient free space for your second Windows 7 partition (by shrinking your existing Win8 partition), you can create one or more logical partitions inside that new free space, and do the Win7 install to one of those empty logical partitions.  You can then use a second logical partition in that same free space for "data", if you want.
    Note that Partition Wizard can even convert one of your existing primary partitions to logical (i.e. convert it to an "extended partition", inside of which will be then be the original primary partition now converted to logical).  You can then shrink or move/resize the partitions on the drive (both primary and logical) however you want, to perhaps make room for additional "logical" partitions inside of that now present "extended partition" which can hold up to 120.  You can even convert ALL of your primary partitions except for the one "active" partition (which MUST BE PRIMARY) to logical partitions, which gives you maximum flexibility in having even more than just two bootable OS's along with one or more data partitions, etc., up to 120 logical partitions... plus the one "active" primary Boot Manager "system reserved" partition which must be kept.

  • WHY is it that you cannot fix (completely so you never have to come back to it again) how adobe flash player works with windows 8.1?

    Hi,
    I would like to start a discussion on how one of the "leading" software companies in the WORLD cannot provide a better way for their software (which I assume they want everyone to use) to be used in conjunction with windows 8.1.   ADOBE no longer provides support for those who don't pay to be here, they don't have a reasonably intelligent way to fix problems for non computer minded people, they want you to go through and change this setting or that (ya, I've seen the page and done the crap they tell you to do to fix the flash player so it works and... it works... for a little while then you wind up with a fkn green screen after another day or two... this is complete BS you shouldn't have to unfk things so they work every few days... you shouldn't have to deal with crap like this... I AM GOING TO USE VLC PLAYER OR SOMETHING ELSE TO TAKE CARE OF MY VIDEO PLAYER NEEDS IN MY DIFFERENT BROWSERS FROM NOW ON... YOU GUYS SUCK, YOU HAVE NO SUCH THING AS SUPPORT ANYMORE AND YOU ARE OBVIOUSLY MOVING BACK INSTEAD OF FORWARD IN THE INNOVATION DEPARTMENT!!!!)
    1.  this should be simple, install the software, install an update if the software is installed and up to date it should work... don't make me fiddle with all the extra bs, your the software developer why cant' you do that????
    2.  you tried to make it easier by making it so flash player is imbedded in my browser, congratulations you made it screwed up... think of it this way, now I have to get rid of your software to have something malleable I can deal with... your software doesn't work half the time, i'm sick and tired of dealing with it... i'm not going to deal with it anymore, I have changed the settings as directed on your help page and it worked.... for a freakin DAY, then I get green screens when I try to use it the very next day... so... I undo the changes I made the previous day... and redo the changes AGAIN and it works AGAIN.... FOR A FKN DAY!!!  WTFO!!!! this is complete and total bs, your idea to make things simpler made things more complicated, more labor intensive, and more of a pain in the azz for the rest of the world... SO I am going to find a way to not have to deal with ADOBE anymore!!! screw you adobe, screw your software, screw your lack of support.  you have nothing to offer me that I cannot get elsewhere with less drama, I hope your business crashes like your software... have a nice day!

    One of my programs needed Flash Player and downloaded it for me!  So, Problem solved.  Thanks to all who are reading this.  I would delete it if I could. 

  • How to use trackpad gestures with Windows 8 Developer Preview?

    I have installed a Windows 8 Developer Preview on my MacBook via BootCamp Assistant. I found that it isn't support the trackpad gestures! (ex: two-fingers tap to right-click)
    So how can I use the trackpad gestures with Windows 8?
    Thank you for all reply.

    The BootCamp drivers that you can download and burn to a disc via the Boot Camp application in Mac OS can be installed in Windows 8 (run setup.exe from the disc while in Windows 8, preferably by right-clicking and choosing "Run as Administrator") and will allow you to use all of the current features of the touchpad (including two finger clicking/tapping).  Once you have installed the drivers as described above, you can then click on the arrow in the System Tray and right-click on the black triangle that is for the BootCamp control panel. In those settings you can change how the touchpad responds to your taps, clicks, etc.

Maybe you are looking for

  • Question Marks in Web Gallery using LRG One (with PayPal) on Mac

    I have an issue when using LightroomGalleries.com's otherwise excellent "LRG One with PayPal" gallery template in the LR Web module on my Macs. The template produces a drop-down menu to display unit pricing, in a range of currency options. When I set

  • Receiver File Adapter J2SE Adapter Engine

    Hi, We have configured a receiver file adapter on a J2SE adapter engine through the administrator page of the J2SE adapter. XI.httpPort=8222 XI.httpService=/file/Receive and the rest of the adapter parameters. I have configured a channel in ID as XI

  • Withholding tax amount exceeds total bank line item amounts

    Dear Sir, While I am trying to make down payment to the WHT vendor I have found the above error.  Can anybody help.  I am not giving any base amount in WHT information while down payment.   It is picking automatically tax code P9.  I am trying to pos

  • Need help with emac restoration

    I bought an eMac in a garage sale. It came with Tiger installed in it. I am completely new to Mac OS's. In the effort of trying to upgrade it to Leopard, I think I erased the hard disk(MacHD). After that it immediately restarted and got stuck on the

  • F4 help in  Layout field (as in MB51)

    Hello Experts, I have to give F4 help in  layout field(as in MB51) in my selection screen For F4 help, I want that list of values get automatically populated as user saves  his variant . Is this possible or I need to harcode list of values in my code