• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help with program

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic