0% found this document useful (0 votes)
137 views

Jcolor

This project report summarizes a Color Chooser program created in Java. The program uses Java packages like AWT and Swing to provide a graphical user interface for selecting colors. It displays three panels - a swatches panel showing color options, an HSB panel showing hue, saturation, and brightness values of the selected color, and an RGB panel for color variation. The program was created in NetBeans using Java and allows users to select colors that can then be applied to GUI elements like text formatting and graphics.

Uploaded by

harsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
137 views

Jcolor

This project report summarizes a Color Chooser program created in Java. The program uses Java packages like AWT and Swing to provide a graphical user interface for selecting colors. It displays three panels - a swatches panel showing color options, an HSB panel showing hue, saturation, and brightness values of the selected color, and an RGB panel for color variation. The program was created in NetBeans using Java and allows users to select colors that can then be applied to GUI elements like text formatting and graphics.

Uploaded by

harsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

A

PROJECT REPORT
ON

Color Chooser IN JAVA

Certificate
Certified that this project report is based on our original
work. Information drawn from other books/journals, World
Wide Web (Internet) and the support of the college has
been duly acknowledged.

Acknowledgement
I am grateful to all those people who extended their
support and completion of my project.

I express my gratitude towards my teachers and I would


also like to express my gratitude towards my IT faculty
members without whom this project would not have been
possible. They have been a motivator & source of
inspiration for me to carry out the necessary proceedings
for the project to be completed successfully.

I again place on record my gratitude to all those who


were instrumental in getting the project work and report
completed.

About The Project


Color chooser is a recreational and functional program
prepared in cor java It is prepared in Core java using java
packages like awt(graphics) and swing for advance GUI it
is mostly used in paint, text format programs and design
creating while we have to choose color for gui behind
pictures and text and colour chooser help us to define
color .it is a single pane program which shows Panel of
Swatches which shows no of colors and other one is HSB
which enlighten the selected color and also the contrast
and then come RGB which is used for variation it is a
short based program and prepared USING NOTEPAD
AND java development kit and java runtime environment

Project title:

Colorchooser project in JAVA

Project category :

Core java
Language and software tool used :

Front End : Java


Operating System : Window 7
Back End : None Used
JDk1.7.0(optional)
JRE

Structure of the project:


JColorChooser provides a pane of controls designed to
allow a user to manipulate and select a color

This class provides three levels of API:

1. A static convenience method which shows a


modal color-chooser dialog and returns the color
selected by the user.

2. A static convenience method for creating a color-


chooser dialog where ActionListeners can be
specified to be invoked when the user presses one of
the dialog buttons.

3. The ability to create instances of JColorChooser


panes directly (within any container).
PropertyChange listeners can be added to detect
when the current "color" property changes.

Hardware requirement :
Operating system: Window 7
Hard disks: 40GB
RAM: 256 MB
Software requirement :
Java language
Net beans IDE 7.0.1(optional)
JDk
JRE

Souce Code

import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class JColorChooserExample
extends JFrame implements
ActionListener{
JButton b;
Container c;

JColorChooserExample(){
c=getContentPane();
c.setLayout(new FlowLayout());

b=new JButton("color");
b.addActionListener(this);

c.add(b);
}
public void
actionPerformed(ActionEvent e) {
Color initialcolor=Color.RED;
Color
color=JColorChooser.showDialog(thi
s,"Select a color",initialcolor);
c.setBackground(color);
}

public static void main(String[]


args) {
JColorChooserExample ch=new
JColorChooserExample();
ch.setSize(400,400);
ch.setVisible(true);

ch.setDefaultCloseOperation(EXIT_
ON_CLOSE);
}
}

Screenshots
Colorchooser Execution in dos
Window OF the colorchooser
First Panel In color Chooser Swatches
Second panel of the colorchooser RGB
Last panel of the HSB

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy