Understanding Java Course Assignment [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Assignment Instructions
I'm not sure what this means or what it is asking me to do, I've been programming with Java for only a few months and this seems really difficult with my limited knowledge.

From what I can tell, your assignment is to draw graphics on a panel using the required methods. The graphics can be of any color or size. Once you have done that, you are to make 3 copies of that panel which will leave you with 4 of the same panel. Then you are to put those 4 panels onto another panel and make a copy of that panel 3 times. This in reality should leave you with 16 of the original panels placed into a 4x4 grid or 4 big panels placed in a 2x2 grid. I would still recommend asking your instructor for help though, incase I am incorrect.

Related

Java: placing JButtons into a JFrame as a rectangle [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
So I am doing a tic tac toe game for my school project and requirements are that the player can choose the width and height. So I started making this game with JButtons but my problem is how can I make it so that my buttons would construct a rectangle at the center of my frame based on the user's inputs. What would be the best approach to do this? I've gotten to the point where I add the correct amount of buttons to the frame but I have no idea what layout/layouts should I use to make the "gameboard" that is constructed from multiple JButtons appear as a rectangle to the center of the frame.
You can use GridLayout. See here for example.
Following are some other useful examples/links:
javatpoint
tutorialspoint

How to create "god rays"? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to create "god rays" effect/lighting on a 3D shape. If I have a Box, I would like to have a light source behind it that will create "god rays" around it. Below, is an image I found showing the idea (imagine the window as an opaque box and the rays coming around all sides):
I tried setting a PointLight source, but all lights illuminate "solid" objects, so you can't see the effect around them. My guess would be to fill the area around the shape with some sort of air-like, partially transparent material, that engulfs the shape; and that the light can reflect from.
How would I go about creating "god rays?

JavaFX Glass shatter / crack and break [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Does anyone have any suggestions as to how I can go about creating an Effect for a JavaFX node that can simulate glass shattering and then (potentially) breaking? if the breaking is more difficult, I can skip that part. Basically I want to layer this pane over an image and then make it look like its a picture frame that then shatters. If it can then break into pieces (after some configurable delay).. that would be great as well!
I've looked everywhere but can't seem to find info on simulating the glass shatter effect in JavaFX.
Thanks!
For a simple solution I'd go with a Path that randomly extends and change the style of the path during time.
More sophisticated code could use a Canvas and paint the shattering on it. Daniel Shiffman with his Nature of Code book may be a base for you with the creation of the shatter effect.

There have any idea for this [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have one task from my lecture which is Java. Lecturer ask us to draw a custom chess game which is something similar with the below picture. I was thinking from past few days but are not able to get at all.
Instruction :
Sorry, if I am asking question wrongly. I am expecting some ideas and any references for in able to do this.
we can write a code for you , but instead step to start will help you more to learn.
There can be many ways to write this one of is this.
Steps to start
Create a JFrame.
Set layout to border layout
Create a JPanel -> set panel at the center of jframe
Set panel layout to grid layout of 11 x 11
Create jable objects in for loop and add in Jpanel components.
Control background color of jlabel to form a structure shown in image.
For pawn, knight,you can use jlabel images
Build you logic to move or change jlabel to acive your requirement
Update and correction are invited

How to construct a JTextArea [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am a very new programmer, it is part of my degree requirements and I am having a hard time with it. I am working on basically a three part GUI and I am wondering how I would create a JTextArea that will display each item that is entered.
Start by taking a look at Creating a GUI With JFC/Swing, this will give you a basic grounding in how to use Swing.
Take a closer look at How to Use Text Areas for specific details about how to use JTextArea

Categories

Resources