About 2,050,000 results
Open links in new tab
  1. java - Setting background color for a JFrame - Stack Overflow

    Mar 6, 2023 · To set the background color for the JFrame try this: this.getContentPane().setBackground(Color.white);

  2. How to Change JFrame Background Color in Java - CodeSpeedy

    In this tutorial, we focus on how to change JFrame background color in Java. We use setBackground() method from Java Swing to achieve this.

  3. java - How to set background color of an Activity to white ...

    Jan 21, 2011 · getWindow().getDecorView().setBackgroundColor(ContextCompat.getColor(MainActivity.this, R.color.main_activity_background_color)); Please be aware though, if you have anything set as the background color in Designer, it will overwrite anything you try to set in your code.

  4. How to Print Colored Text in Java Console? - GeeksforGeeks

    Aug 12, 2021 · How to Print Colored Text in Java Console? Remember that in Java Programming the background color and text color of the output screen is black or white by default. If we want to Highlight some text on the output screen then we can …

  5. Change JFrame Background Color in Java - Online Tutorials …

    Learn how to change the background color of a JFrame in Java with this step-by-step guide. Enhance your Java GUI applications effectively.

  6. Background Colors in Java - Delft Stack

    Feb 26, 2025 · This tutorial demonstrates how to change background colors in Java applications using Swing and JavaFX. Learn to enhance your UI by applying various methods for setting background colors, including predefined colors and custom shades.

  7. Color - JavaBitsNotebook.com

    Since Java works with the RGB color system, you can fine tune your colors by controlling the RGB (red / green / blue) density values. Each of these 3 colors has 256 shades. It is possible to "mix" a new shade of color by selecting an integer from 0 to 255 and passing it …

  8. Java Code Examples for java.awt.Color # white()

    Java Code Examples for java.awt.Color # white() The following examples show how to use java.awt.Color #white() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

  9. How to set the JFrame background color - alvinalexander.com

    Jun 4, 2016 · In general, to set the JFrame background color, just call the JFrame setBackground method, like this: jframe.setBackground(Color.RED); Note that there are many more things you can do with the Java Color class , including:

  10. java - android plain white background without gradient - Stack Overflow

    You can do it through Java code, using layout.setBackgroundColor(Color.rgb(255, 255, 255));. Extend the theme and change its background: <item name="android:background">@android:color/white</item> <item name="android:windowBackground">@android:color/white</item> <item name="android:colorBackground">@android:color/white</item>