The guys from the coderanch helped me and now everything works. Using glue was the trick. Thanks for the help
Type: Posts; User: luckduck312
The guys from the coderanch helped me and now everything works. Using glue was the trick. Thanks for the help
What I want is a small JButton with a image in the very top left corner. Then I want 3 JLabel with image in the left side, 1 JButton with image in the middle and 3 JLabel with image in the right...
I'm trying to make a game with a menu and therefor I'm using the setAlignment which seem to have no effect.
(I'm not sure how I attach images so it might not run.
package fold;
I found another method that gives me the correct result. Thanks for alle the help
Here is a small test program. What I want is a background that other components can be painten on top off (JLabels, canvas...) This backgroundimage should be the size of the image so its bassicly...
I dont get an error the background just does not seem to load. If i remove the line setContentPane Only the background is shown else everything but the background is show.
I'm trying to make minesweeper and a struggling trying to make a background image for my JFrame. I think the program breaks when setContentPane(screen) is run.
//pakke der styrer...
We have 2 classed Dummy1 and Dummy2
What I want is a vairble that "stores" those classes like so:
"classholder" ranodmClass = Dummy1 or "classholder" randomClass = Dummy2
Now I can use...
What I want is somehow to store "ClassName" in a varible or something. So when I use the varible I'm able to create a new ClassName
ClassName variable = new ClassName();
What do you mean by a "class"? I have alle these different towers (each is its own class)
Where do you want to store it? In a varible
What is it that you want to store? What I want to store is...
Alright thanks this works.
Do you know how to store a refrence to a class?
Is there a way to make line drawed with drawLine thicker?
Yeah but how do refrence the image?
Do you know how to display image using Graphics?
First and foremost I would like the EAST menu to be exacly as big is my pictures. Then I want my EAST menu to be very close to my canvas (almost touching). Third i want my jLabels in my EAST menu to...
I keeps going over my CENTER region, and my jLabelels are not centeret.
Is it possible to upload images?
Hi everyone I'm new to java and are making a big project for the first time therefor I want to creative some menu's. In this conetext I'm using borderlayout. In my SOUTH reagion, I have a gridlayout...
I tried using af grid inside my NORTH region which seems to work, thanks for the help
Do you know any other tools that can make menu with text and buttons? Not even sure Borderlayout is able to solve my problem. The best solution migt just be hardcoding every element and making my own...
I have uploadet the wrong code in GameFrame, but it should be fixed now. I have also read the oracle turtorial and have tried and implement it into my code, it still not the way I want it but its...
In region NORTH I want a simple menu that hold a bottun (to start rounds) and a couple of info boxes that display information. I region CENTER I want my actully game to run. I region EAST I also want...
I have read it, my problom is that I still dont know what to do when I put classes in my borderlayout.
Thanks for the reply, I have done as you have requested.
I'm new to java and are working on my first big projekt which is a game. In this tower defence game I want a couple of menues, to both display information and have bottuns. To make this i'm using...