Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

change color in titleborder

Posted on 2002-04-24
2
187 Views
Last Modified: 2007-11-27
hi

i am using the codes below

m2.setBorder(BorderFactory.createCompoundBorder(
          BorderFactory.createTitledBorder("Error "),
          BorderFactory.createLoweredBevelBorder()));


How can I change the color of Error??


according to tutorial, it is based on defaults, how can I change it??
0
Comment
Question by:TLTEO
  • 2
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 6967102
TitledBorder title =  BorderFactory.createTitledBorder("Error ");
title.setTitleColor(Color.red);
m2.setBorder(BorderFactory.createCompoundBorder(
         title,
         BorderFactory.createLoweredBevelBorder()));
0
 
LVL 92

Expert Comment

by:objects
ID: 6967710
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
javap bin 2 40
jboss wildfly 10.1 10 228
Eclipse Java import and method not resolved 4 48
Need Help! Getting a syntax error and don't understand why 3 31
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question