Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6332879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:21:42+00:00 2026-05-24T18:21:42+00:00

I have an SWT window wherein there is Group widget in which i placed

  • 0

I have an SWT window wherein there is Group widget in which i placed couple of other widgets,i set the title of group & its working fine. The group title color is blue always(in my case i am not sure) and that doesn’t sync up with other children inside group.So i wonder if there is a way to change the group title text color and font if there is a way ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:21:42+00:00Added an answer on May 24, 2026 at 6:21 pm

    It’s quite easy to change font of group, check this snippet (used snippet from java2s.com)

    //Send questions, comments, bug reports, etc. to the authors:
    
    //Rob Warner (rwarner@interspatial.com)
    //Robert Harris (rbrt_harris@yahoo.com)
    
    import org.eclipse.swt.SWT;
    import org.eclipse.swt.graphics.Color;
    import org.eclipse.swt.graphics.Font;
    import org.eclipse.swt.graphics.RGB;
    import org.eclipse.swt.layout.*;
    import org.eclipse.swt.widgets.*;
    
    /**
     * This class demonstrates groups
     */
    public class GroupExample {
      public static void main(String[] args) {
        Display display = new Display();
        Shell shell = new Shell(display);
        shell.setLayout(new GridLayout());
    
        // Create the first group
        Group group1 = new Group(shell, SWT.SHADOW_IN);
        group1.setText("Who's your favorite?");
        group1.setLayout(new RowLayout(SWT.VERTICAL));
        group1.setFont(new Font(display, "Consolas", 10, SWT.BOLD));
        new Button(group1, SWT.RADIO).setText("John");
        new Button(group1, SWT.RADIO).setText("Paul");
        new Button(group1, SWT.RADIO).setText("George");
        new Button(group1, SWT.RADIO).setText("Ringo");
    
        // Create the second group
        Group group2 = new Group(shell, SWT.NO_RADIO_GROUP);
        group2.setText("Who's your favorite?");
        group2.setLayout(new RowLayout(SWT.VERTICAL));
        group2.setForeground(new Color(display, new RGB(255, 0, 0)));
        new Button(group2, SWT.RADIO).setText("Barry");
        new Button(group2, SWT.RADIO).setText("Robin");
        new Button(group2, SWT.RADIO).setText("Maurice");
    
        shell.open();
        while (!shell.isDisposed()) {
          if (!display.readAndDispatch()) {
            display.sleep();
          }
        }
        display.dispose();
      }
    }
    

    It provides this behavior on W7

    font change on group in W7

    But as you can see, change of color by setForeground(Color c) doesn’t change a thing, when I search for additional info I found bug report on SWT bugzilla The color of the title of the group control cannot be changed. It’s windows platform dependent bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SWT app that opens a OpenGL window (using the LWJGL library)
I have a small problem with a SWT.Browser widget who throws a quite puzzling
I currently have a Table [org.eclipse.swt.widgets.Table] with several TableColumns; however, due to UI space
I have an SWT TableViewer which, of course, displays the contents of a Table
I have a MVCish deisgn using SWT. I have a class which implements the
I have an eclipse plugin project which uses some swt objects, eg - import
I'm trying to have "Hello SWT" show up in the center of a window
I have been working on a SWT-based project which is intended to be deployed
I have a tiny (rikiki) problem in SWT ... I am making a small
I have a strange case with SWT and Button after using setEnabled() - seems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.