8 Years
Discussion Span
Last Post by JamesCherrill

"We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well."


Of course i am willing to put effort.

I dont expect to get the GUI ready , i need some help with it cuz its the only thing i cant understand at Java with all these frames,panels etc


You need to be a lot more specific about the help you want. If you don't understand "all these frames, panels etc" then I doubt that anyone will have the time to create a personal tutorial for you. Work through a couple of the excellent tutorials on the web.
If there's something specific you don't understand or can't get to work, ask again.


Here are some of my questions.

How do i put rows and columns to my GUI? do i need a JPanel/Label for that?

How do i add blank images to show that there are empty spots for car to park?

How i can add actions to button for example when i press add car a car image is put to a blank space?

Last one i need a mouselistener so that when i click an already parked vehicle(vehicle image) its removes

Below there is an attachment of my GUI assessment you can check if u want

Sorry for being so tedious and annoying its that i have a deadline for tomorrow and im very stressed

Edited by chrisMed7: n/a


Sorry brother, given your starting point there's no way on earth you're going to complete this tomrrow. There's nothing I can do to help (except to write it for you, which is a complete no-no!). Good luck.


Could you at least answer my questions and give me some sinple examples?


I'm going out soon, so this will have to be v quick.

1. Two JPanels 1 for buttons 1 for the RHside all in a JFrame.
2. Use JLabels for the car park spots - set them all to the same size. Use ImageIcons to set the graphics in the JLables, for a blank just don't set anything, or, have a blank image of the same size..
3. add an ActionListener to the button
4. add a MouseListener to the JLabels, in the Listener just set the labels' ImageIcon to null (or a blank image).

Over to you...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.