Search:

Type: Posts; User: luckduck312

Search: Search took 0.10 seconds.

  1. Replies
    5
    Views
    1,278

    Re: setAlignment have no effect

    The guys from the coderanch helped me and now everything works. Using glue was the trick. Thanks for the help
  2. Replies
    5
    Views
    1,278

    Re: setAlignment have no effect

    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...
  3. Replies
    5
    Views
    1,278

    setAlignment have no effect

    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;
  4. Re: Setting a background image on a gameFrame

    I found another method that gives me the correct result. Thanks for alle the help
  5. Re: Setting a background image on a gameFrame

    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...
  6. Re: Setting a background image on a gameFrame

    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.
  7. Setting a background image on a gameFrame

    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...
  8. Replies
    19
    Views
    811

    Re: Layout in java

    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...
  9. Replies
    19
    Views
    811

    Re: Layout in java

    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();
  10. Replies
    19
    Views
    811

    Re: Layout in java

    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...
  11. Replies
    19
    Views
    811

    Re: Layout in java

    Alright thanks this works.

    Do you know how to store a refrence to a class?
  12. Replies
    19
    Views
    811

    Re: Layout in java

    Is there a way to make line drawed with drawLine thicker?
  13. Replies
    19
    Views
    811

    Re: Layout in java

    Yeah but how do refrence the image?
  14. Replies
    19
    Views
    811

    Re: Layout in java

    Do you know how to display image using Graphics?
  15. Replies
    19
    Views
    811

    Re: Layout in java

    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...
  16. Replies
    19
    Views
    811

    Re: Layout in java

    I keeps going over my CENTER region, and my jLabelels are not centeret.

    Is it possible to upload images?
  17. Replies
    19
    Views
    811

    Layout in java

    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...
  18. Replies
    12
    Views
    686

    Re: Button in borderlayout

    I tried using af grid inside my NORTH region which seems to work, thanks for the help
  19. Replies
    12
    Views
    686

    Re: Button in borderlayout

    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...
  20. Replies
    12
    Views
    686

    Re: Button in borderlayout

    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...
  21. Replies
    12
    Views
    686

    Re: Button in borderlayout

    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...
  22. Replies
    12
    Views
    686

    Re: Button in borderlayout

    I have read it, my problom is that I still dont know what to do when I put classes in my borderlayout.
  23. Replies
    12
    Views
    686

    Re: Button in borderlayout

    Thanks for the reply, I have done as you have requested.
  24. Replies
    12
    Views
    686

    Button in borderlayout

    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...
Results 1 to 24 of 24