代写范文

留学资讯

写作技巧

论文代写专题

服务承诺

资金托管
原创保证
实力保障
24小时客服
使命必达

51Due提供Essay,Paper,Report,Assignment等学科作业的代写与辅导,同时涵盖Personal Statement,转学申请等留学文书代写。

51Due将让你达成学业目标
51Due将让你达成学业目标
51Due将让你达成学业目标
51Due将让你达成学业目标

私人订制你的未来职场 世界名企,高端行业岗位等 在新的起点上实现更高水平的发展

积累工作经验
多元化文化交流
专业实操技能
建立人际资源圈

Assignment代写:Java Programming

2018-04-23 来源: 51due教员组 类别: 更多范文

下面为大家整理一篇优秀的assignment代写范文- Java Programming,供大家参考学习,这篇论文讨论了Java图形界面的编程。

Java Programming,Java图形界面,assignment代写,美国作业代写,作业代写

Throughout the semester, we have been working on command line applications. While the command

line can be a powerful form of interacting with the computer, most modern applications have a

graphical user interface, or GUI. This program will give you some initial experience making GUI

applications with Swing.

Things you will learn

• How to set up a simple GUI based on JFrame

• Setting up listeners and responding to events

• Drawing simple shapes and images

• Dealing with mouse and mouse motion events

Directions

1. Write a GUI application in Java using Swing that has four buttons and a drawing area. The

buttons should be at the top of the window. Three of the buttons should be labeled “Oval”,

“Image”, “Center”. The fourth button should be labeld with your name.

2. Give the window an initial size of 800 x 600 pixels, and put your name in the menu bar.

3. The drawing area should cover the remainder of the window.

4. When it starts, the program should show an oval in the center of the screen. Also the

background of the drawing area should be a non-white color.

5. Pressing the Oval or Image buttons should switch between the display of an oval and an image

of your choice, so that only one is visible at a time.

6. You must also be able to click and drag the rectangle or image around the screen with the

mouse. Also, the positions of the two objects must not change as you toggle between them.

7. The “center” button should cause the oval and image to jump to the center of the window.

8. When the user presses the button with your name on it, the program should do something else

not described in the assignment that is unique to your program, such as change the color of all

the things you draw, switch the oval to be outlines instead of filled, or draw your name in the

middle of the window.

9. As always, make sure the proper block comment is at the top of your main file with your name.

10. Once your program is working, pass it off directly to the instructor or TA. Also, turn in your

code to D2L.

Suggestions

• Get the skeleton of your GUI working first. First get the buttons drawing properly, then go on

to listen to and respond to events.

• Initially, hook up the event listeners so that they print something to the console when a button is

pressed. That way you can know that your code is getting events.

• Make a subclass of JPanel called “DrawPanel” or something like that to draw the objects.

Override the “paintComponent” method of this class. This class needs boolean variables to

decide whether to draw the rectangle, oval, your name, and the special. It may also need other

variables to indicate colors, positions of things, etc.

• You can measure a string using the FontMetrics class. This measures how much space (in

pixels) the string will take when drawn. You would use this information to determine where to

place the text and backing rectangle.

Point Breakdown (20 points total)

Compiles and runs on command line Required for a non-zero score

Proper indentation, spacing, header comment 2 pts

Starts with an oval and colored background 3 pts

Quits when you press the x on the window 2 pts

Draws oval and image and switches between them 5 pts

Moves oval and image independently using mouse 5 pts

Does special 3 pts

51due留学教育原创版权郑重声明:原创assignment代写范文源自编辑创作,未经官方许可,网站谢绝转载。对于侵权行为,未经同意的情况下,51Due有权追究法律责任。主要业务有assignment代写、essay代写、paper代写、美国作业代写服务。

51due为留学生提供最好的assignment代写服务,亲们可以进入主页了解和获取更多assignment代写范文 提供作业代写服务,详情可以咨询我们的客服QQ:800020041。

上一篇:Assignment代写:Enterprise accoun 下一篇:Assignment代写:Making Interactiv