Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 20th, 2013, 02:53 PM
Registered User
Join Date: Sep 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default JTabbedPane - different color per selected tab.

I'm trying to create a JTabbedPane with tabs that will have different colors when selected. For example, let's say I have tabs A, B, and C. If a tab is not selected, then the tab color will be the default. If tab A is selected, then the tab color will change to red. If tab B is selected, then the tab color will change to green. If tab C is selected, then the tab color will change to yellow. How can I achieve this behavior? The closest method I could find was calling UIManager.put("TabbedPane.selected", Color.RED) but this sets the color of all selected tabs to red.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing selected pixels to a specific color Gary108 BOOK: Visual Basic 2010 Programmer's Reference 1 February 4th, 2012 05:37 PM
change the color of selected text dynamically NEO1976 Flash (all versions) 1 December 18th, 2007 11:11 AM
How to change the color of selected row of an HTML bhavna HTML Code Clinic 4 February 11th, 2007 09:22 PM
How to change color of selected external listview method VB How-To 8 October 20th, 2006 07:01 PM
JTabbedPane display and input help required... kaizer Java GUI 2 August 22nd, 2004 05:37 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.