m dawg

Greenhorn
+ Follow
since Nov 05, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by m dawg

I really don't have anything just trying to get started. There doesn't need to be a ball. I just want to be able to: Here is what i need, i need to have a frame, that has a few buttons on it like two, square and circle. There will be a grid on the board where there images will click into place. They can be 10 across and 10 down 0-9 and each grided box is 30x30. So, when the user clicks on the button that has an imageIcon on it it paints that same imageIcon onto the gird. If you can help me out and get me started i would really appreciate it. Thank you so much. So, when the user clicks on the screen it will do nothing untill he click the button with the shape he wants to place on the grid. It needs to be a point then just click on the grid and panel and it will place that imageIcon, a gif or something. Thanks to all and Gregg
23 years ago
Gregg,
I am doing it for fun. I want to learn java and how to make games. Thanks. I am trying to click on a button that is when i click on it and you can point and click on the grided screen and it paints that shape. How would i do that. Thanks
mdawg
23 years ago
Hey,
I am creating a GUI, ok it is a JFrame that has a gamePanel that keeps all the object drawn on the screen like a drawing panel. Now i want to have a build mode and a run mode. when clicked on the build mode it draws a grid over the game panel and also it has buttons that you can click on to place the objects on the screen(square, circle...ect) in run mode the grid will go away and you can animate the ball. Im just looking for help and some code on how i would have this set up. if anyone can help i would really appreciate it. THANKS!!!
23 years ago
Gregg,
Hey, i am haveing some problems. Ok, what i want to be able to do is: Ok, i have a GUI aready built. I have a JMenuBar and on this i have file, edit, modes, help. Ok What i want to be able to do is when i click on modes in this i have the option to click on build mode. this should open on my JFrame as a JPanel that is 500x500, by the way my JFrame itself is 800x600. Ok, and on this build panel i am able to add things to it like a circle and a square and so on. they should click into place. on my build mode panel i have a grid that is each grid box is 25x25, that is easy to make. Ok, now when i go back up to the modes menu and then click on run mode, the grey grid lines will go away and the objecs will still be in the same place. When i ad a ball, then i will have to click the start button for the ball to move and bounce off the objects. My problem is doing the if(command.equals(RunMode){
//is this what i should do and also for the build mode should i do the same thing and in this have two for loops that make the grid thing.
Gregg i really need some help on this on. I would really appreciate it if you could if not i would completely understand. thanks for you time to post back to me
mdawg
23 years ago
Thanks all,
i really appreciate all your help!!! If anyone one has any examples please post them thanks.
23 years ago
Hey,
I have a JFrame that is 800 X 600. Ok in this JFrame i have a JMenuBar. On the JMenuBar i have a Menu called modes. In this i have two modes one is a runmode and the other will allow the user to build so it is a build mode. My problem is creating these JPanels in the JFrame. But, i don't want them to be on at the same time. Say if one is clicked the other will go away but no lose any data and the other will appear. These JPanels will be about 500X500. I can't get it to show up. I do have the buildmode as a class and the same as the runmode. I really need help if anyone can help me. PLEASE!!! Some sample code could get me going this is what i have so far. I know there are problems please help. I can't get anything. I also have the actionPerformed ready to go with no code in it so that it will go to different frames. Oh yea, there should be a main because the objects on the main screen needs to stay because the diffent thing about the build mode it that it draws a grid where you place objects but it will have some buttons too. Please help thanks

private JPanel buildmode, runmode;
private Dimension bmDim;
private Dimension rmDim;
public GizmoBallGUI() {
initComponents();
setTitle("GizmoBall");
setSize(WIDTH, HEIGHT);
Container contentPane = getContentPane();
buildmode = new JPanel();
buildmode.setLayout(new BorderLayout());
buildmode.setBackground(Color.white);
contentPane.add(buildmode);
bmDim = new Dimension();
bmDim.setSize(500, 500);
buildmode.add(BorderLayout.CENTER, bmDim);
23 years ago

Hey,
I have a JFrame that is 800 X 600. Ok in this JFrame i have a JMenuBar. On the JMenuBar i have a Menu called modes. In this i have two modes one is a runmode and the other will allow the user to build so it is a build mode. My problem is creating these JPanels in the JFrame. But, i don't want them to be on at the same time. Say if one is clicked the other will go away but no lose any data and the other will appear. These JPanels will be about 500X500. I can't get it to show up. I do have the buildmode as a class and the same as the runmode. I really need help if anyone can help me. PLEASE!!! Some sample code could get me going this is what i have so far. I know there are problems please help. I can't get anything. I also have the actionPerformed ready to go with no code in it so that it will go to different frames. Oh yea, there should be a main because the objects on the main screen needs to stay because the diffent thing about the build mode it that it draws a grid where you place objects but it will have some buttons too. Please help thanks

private JPanel buildmode, runmode;
private Dimension bmDim;
private Dimension rmDim;
public GizmoBallGUI() {
initComponents();
setTitle("GizmoBall");
setSize(WIDTH, HEIGHT);
Container contentPane = getContentPane();
buildmode = new JPanel();
buildmode.setLayout(new BorderLayout());
buildmode.setBackground(Color.white);
contentPane.add(buildmode);
bmDim = new Dimension();
bmDim.setSize(500, 500);
buildmode.add(BorderLayout.CENTER, bmDim);
23 years ago