Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

what is import.awt.button; for?

+3 votes
asked Feb 4, 2015 in (Winter 14) by Rafael Rodriguez (100 points)

1 Answer

+1 vote
I took the liberty into researching it for myself and found this:


to summarize, it seems like a way to give a "button" three functions, one as it is visually, one that has input focus, and a visual when the button is pressed, which activates some sort of action.

It seems pretty useful for our nifty projects, but I feel it's way out of the scope of our class, as much as I would like to use it.
answered Feb 4, 2015 by Alerik Vi (100 points)
Yes, there are other more complex ways of doing Graphics with Java, including using buttons & text boxes & such.  You'll get to use these if you take CSC 212.  They are out of scope for this class... just stick to the DrawingPanel!