File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes How to create user defined component?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to create user defined component??" Watch "How to create user defined component??" New topic

How to create user defined component??

dheeraj chhabra

Joined: Apr 09, 2004
Posts: 23
Hi u all,
I have a requirement to create a component in java without using java in-built class.
For example:--
i have to create a button which behaves like JButon component in java.

i m not getting how to proceed.

Any1 plz can give me any guideline.
waiting 4 ur kind response..
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
Hi, it's a nice practice on this forum not to use the kind of abreviations you're using. There're a lot of people that don't have english as their first language (or just don't speak nice english) and might not understand your question.
Doing this you're only resctricting the number of answers you could get.

Leandro Melo
SCJP 1.4, SCWCD 1.4
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

Normally, the way to add custom behavor to components is to extend them; that is, create a subclass of JButton called MyButton (or some such). Why can you not use the built-in classes?

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I agree. Here's the link:
subject: How to create user defined component??
It's not a secret anymore!