• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with program

 
Ebu Kon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I am an undergraduate taking a Java Introduction course. I have a programming assignment due soon. I don't know why my instructor gave us such a difficult assignment for a beginner's course. I was working on this for several hours and got know where. Tried to piece together some code the instructor gave us but no luck. Need some help, please.

Task: Write a Frame apllication with Menu:
-To create an image by adding various shapes with distinctive colors.
-To edit an image by moving, scaling, or deleting its components.
-To view a picture album or make a slide show.
-Function can be activating by Buttons, MenuItems, or by giving a command through a Textfield.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

The most important thing to remember is to program the way real programmers do: write a little code, compile and test it. Write a little more, compile and test. Don't write hundreds of lines of code, then spend hours trying to get it to compile!

So just break this down into pieces. As you tackle each piece, compile it, try it out, make sure it works the way you want, and then go on to the next piece.

So the first piece would be to get a frame (a JFrame) onto the screen. Do you know how to do that?

Second step: add a JMenuBar with one JMenu to your JFrame.

Third step: add a JMenuItem to the JMenu which does something simple like exit the application.

Fourth step: add a menu item which adds a circle to the JFrame.

Fifth: another menu item which adds a square.

And so on. So: get started on that first step! Create a trivial application which does nothing but get a 500 pixel square JFrame onto the screen.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic