Application wide setSelectionColor

From: Reinhard Engels (beautiful_idiot_at_yahoo.com)
Date: 03/24/04


Date: 24 Mar 2004 09:44:36 -0800

JTextPane lets me set the background color of selected text with the
setSelectionColor method. Though I don't offhand see how to do this
for some other components (like JTree), I imagine there must be a way.

But rather than hunt each component down, is there a way I could set
this in a single place for all swing components in my app? I know I
can do this at the OS level (at least on my mac) but I don't want to
have to presume this kind of knowledge from users, and the default
selection colors lack the visual contrast my app requires.

Thanks in advance,

Reinhard

www.everydaysystems.com



Relevant Pages

  • Re: Deriving the word (range) at cursor location
    ... Dim oRg As Range ... The Selection object exists even when you have a flashing cursor. ... remove the background color for all instances of that word. ... I can iterate thru the document's Words collection to remove all ...
    (microsoft.public.word.vba.customization)
  • Re: SpatialSearch not working on 1D shapes
    ... >I am using the Visio2003 Drawing Control in a .NET windows app. ... > I am using in my app) but returns null when the clicked shape is a one ... > dimensional shape (the 'Transition' shape from the ROOM stencil). ... > Selection foundShapes = currentPage.get_SpatialSearch(clickLocationX, ...
    (microsoft.public.visio.developer)
  • Re: No sound...?
    ... TextEdit - open selected file. ... If I want to open a selected file, ... applicaiton that selection will be passed to the application in the ... That is a bad name - as Import Image is not the name of an app I would ...
    (uk.comp.sys.mac)
  • Re: I am using the DIRLISTBOX in VB 6..Need it to show hidden directories. I cant find a way for it
    ... >> I am using the DIRLISTBOX in VB 6..Need it to show hidden directories. ... I will need to be able to select the share via controls ... >> for Dir location only selection etc. ... This app is going to be used in house, ...
    (microsoft.public.vb.controls)
  • Re: Tablelist and tk_messageBox interaction
    ... I'm working on app that relies heavily on Csaba Nemethi's Tablelist widget to display database records. ... The app is designed so that if the current record has been modified and not saved when a new record is selected, a tk_messageBox is opened to warn the User and allow them to save the record before continuing to the newly selected record. ... Under normal circumstances this works as intended, except if the User does a "drag" operation during the selection of the new record. ... Both scripts behave correctly, on both platforms. ...
    (comp.lang.tcl)