I am making a java version of BlackJack for a project. I have a text version running perfectly except I am trying to convert it to a GUI. I decided to use a JSlider object to use as a way to enter the "Bet". I made a JFrame that runs and works as intended. The problem arises when I try to load this frame from an Applet. The applet loads the frame as an applet window and the JFrame is incapable of dealing with that. I have included the code for the JFrame. Please advise on how I should load the frame from an Applet.
I do not clearly understand whether you want to load the SliderExample component into the applet or open it in its own separate top–level container (such as JFrame or JDialog). The second option seems like the easier of the two so I'll suggest a way to load the SliderExample component into the applet.
Joined: May 24, 2004
Thank you very much for responding. I was trying to open the SliderExample component as its own window so that when the user clicks on a button to load the SliderExample, a new window pops up and the user can input the bet and then the window closes. Having another container, although a good idea, complicates things as I have images displayed on the applet. Please advise on how I could open a new window. Thanks