Re: A Java Swing Question
I don't think it's really necessary to create your own component for this,
when JButton already has a constructor that takes an Icon (a picture) as its
parameter. All you need to know is how to make a GIF file into an icon, and
where "frame" is the JFrame your components are being put into.
But your question "how you call that class... from another program"
indicates that you don't know Java yet. You don't call a class, you create
objects of a class and call their methods. You might find it better to work
on a less technical project while you are learning, then come back to Swing
once you understand object oriented programming better.
Dixon <Dixtigger@yahoo.com> wrote in message news:firstname.lastname@example.org...
> Hi Pro Developer,
> I have a professional question about JFC pluggable look
> and feel. I need help on understanding how to create my own
> custom UI component, I've looked at the APIs but I'm not
> too good at writing code by looking at the APIs what I need
> from you is simple sample of a least how to create a custom
> button UI in which you can put a .gif button in place of
> the standard "gray" color java button. and then I need to
> know how you call that class that you already wrote from
> another program and use that class and asign it to
> different button graphic.. like that .gif or .jpg files.
> I will be very happy if you help me on this professional
> question my project is a GUI messanger using graphics
> instead of the standard java colors.
> Thanks in advance,
> and I hope to here from you soon.