Originally posted by Matthew Helling:
If y'all tell me I can't get help with awt, thats cool, I guess I'll spring for a new book.
1- my checkboxes don't immediately work. I have to check a box, uncheck it, and then on the second time I put a check in it will "activate" the code.
2- I'm having trouble getting multiple boxes to work in conjunction. For example, if you check the box for "push mower", then check the box for "Snapper (a mower brand)" it will properly narrow down the choices. But if you uncheck "push mower", it comes back along and re-displays ALL non-push mowers, Snapper or otherwise.
Is it kosher to post the whole code up here?
I know swing exists, but my only java book doesn't cover swing (its an old book). If y'all tell me I can't get help with awt, thats cool, I guess I'll spring for a new book.
My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Originally posted by Matthew Helling:
I went ahead and extended the applet aways with more checkboxes and extension to the server class. I'm ok with just doing everything inside the applet, it cuts down on how many files have to be posted/distributed.
It's fine if you want to embed everything in the applet if the data isn't going to change. If you keep the data separate, though, you won't have to create a new version of the applet every time the data changes.
1- I want to add a "recommendations" text box that automatically fills in recommendations as the various options are checked.
Not sure what you mean by "recommendations"... what sort of data are you planning for this text box to hold?
2- after a configuration is made, how hard would it be to save it? Can I have a txt file that would store a quote number followed by the true/false of each checkbox. I know java has quite a bite of "sandboxing" built in.
3- same question, but instead of saving it, emailing it.
For both of these, you would need a servlet (or some similiar program) running on the web server. The applet actually runs on the client machine, only it's code is downloaded by the browser from your site. Unless you go to a lot of trouble and expense to make a signed "trusted" applet, you won't be able to save a text file on the users computer. (You *could* open a stream to another program running on your server, have it write a file on the server, then redirect the user to that file. However, it would still require the user to download the file themselves, and your server would slowly fill up with these files.) Email is the same, you'd have to send the data to another process running on your server and have it email the data to the user.
4- a warning box. This should be relatively easy I'd think. I was thinking if you select a configuration that isn't recommended it changes the background color of the List to Red.
Take a look at the Dialog class for the warning box. And you could just use setBackground( Color.red ) on the list to make it red.
5- disabling checkboxes. I was thinking there should be something like setState.Disabled. Something where it would gray out options that are no longer possible
That method is setEnabled( false )
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Consider Paul's rocket mass heater. |