This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create user defined component??

 
dheeraj chhabra
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
bbye
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic