The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

JFrame properties for an Applet to be embedded in website?

I've been trying to find a way to gain access to all the JFRAME functionality
like buttons etc in an applet which is being doublebuffered. Is there any
way to have these buttons etc and chat style panes in an applet?

BUT ..... I want to be able to use the JFrame things like buttons to choose
items in the game, and I want to be able to implement a little chat client in
the game as well ......

What would you recommend I do to accomplish this?

I was thinking about writing it all from scratch, boundary boxes and parsing
text to fit inside for the chatbox etc ... and then for the buttons / hotkeys
in the game but JFrame buttons in there to do all the actions but I'm
starting to think that I'm tackling this in the wrong way entirely.

Any help please? Or would using JFrame properties inside my applet work?

VERY IMPORTANT: This is to be embedded into a website so it cannot have
standard windows style borders etc, I just want to utilise the JFrame assets
like buttons etc ...

Re: JFrame properties for an Applet to be embedded in website?

Thanks so much for the advice you've given so far and I've been frantically trying to make buttons work, AND THEY DO ..... but not how I want them to work.

I can run a standard JFrame and have the content pane display and do something with the button but that's not what I want to do.

I am building a game and I have an applet that extends Applet and I manage my own resources in there like loading images, sounds and have created GUI placement tools and working on a network component and sql database interaction but I just cannot grasp how to use swing buttons without having a standard FRAME generated.

I want to be able to use the components from swing but without them opening their own window/application. So use the button functionality without having to make an application for them to run inside. Is there an easy way to do this?

Could you perhaps give me an example of how to make a button if I inboxed you my code? I think seeing it come to life INSIDE my code would be the best way for you describe it for me, from there onwards I can tackle it all myself.

Re: JFrame properties for an Applet to be embedded in website?

Add the components (JButton, etc...) to a JPanel, then add this JPanel to a JApplet. Like I mentioned, there are many code examples online, and if you want specific help with your code you are better off posting it directly in the forums (see my signature on how to make an SSCCE)