Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Discussions / General Discussions / Re: Best NetBeans Theme For Java on: 2013-02-20 14:47:45
http://netbeansthemes.com/monster/
http://netbeansthemes.com/twilight/

This two are pretty awesome... I might just change a little bit bg color.
2  Discussions / General Discussions / Re: Best NetBeans Theme For Java on: 2013-02-18 17:49:15
not bad.. I guess the one which you showed me is already in a theme list of NetBeans ?
3  Discussions / General Discussions / Re: Best NetBeans Theme For Java on: 2013-02-18 15:37:56
Read subject, I need themes where you write your code.. example:  http://transphorm.com/wp-content/uploads/2008/12/markyh.png - aww this one was really ugly
4  Discussions / General Discussions / Best NetBeans Theme For Java on: 2013-02-18 14:05:44
May someone suggest me a good theme or just screenshot your own you created, which really doesn't hurt alot eyes?
Thanks in advance!
5  Java Game APIs & Engines / Java 2D / Re: problem accessing to the array in a loop on: 2013-02-16 23:54:05
However, let's figure out what's the problem, so that I can know solution:
At begin of Board class, I've declared:
1  
2  
3  
private Border blueBorder[] = new Border[2];
private Border redBorder[] = new Border[2];
private Border greenBorder[] = new Border[2];


As well I initialized them:
1  
2  
3  
4  
5  
6  
7  
for (int i = 0; i < 1; i++) {
    for (int j = 0; j < 2; j++) {  
           redBorder[j] = new Border("border_red.png", j * (BOARD_WIDTH - 110), i * 300);
           blueBorder[j] = new Border("border_blue.png", j * (BOARD_WIDTH - 110), BOARD_HEIGTH - 15);
           greenBorder[j] = new Border("border_green.png", j * 345, 15);
    }
}

So, they're all using the same class, and as you can see where I init them, it's constructor which receives parameters (image, posX, posY).
What do you think is solution ?
6  Java Game APIs & Engines / Java 2D / Re: problem accessing to the array in a loop on: 2013-02-16 23:04:03
Instead of declaring each
1  
Rectangle rGreenBorder[i] = (Rectangle) greenBorder[i].getBounds();
I decided to go for less lines but few chars longer if condition.. Cheesy
1  
if (rPlayer.intersects(greenBorder[0].getBounds()))
7  Java Game APIs & Engines / Java 2D / problem accessing to the array in a loop on: 2013-02-16 14:55:02
I got an error as you can see below...

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
Rectangle rGreenBorder[] = new Rectangle[greenBorder.length]; // length 2
for (int i = 0; i < greenBorder.length; i++) {
    Border border = (Border) greenBorder[i];
    rGreenBorder[i] = border.getBounds();
   
    // Exception in thread "Thread-1" java.lang.NullPointerException
   // at java.awt.Rectangle.intersects(Rectangle.java:786)
   if (rPlayer.intersects(rGreenBorder[0])) {
          player.setX(player.getWidth() + 15);
    }
    if (rPlayer.intersects(rGreenBorder[1])) {
          player.setX(BOARD_WIDTH - player.getWidth() - 15);
    }
   
    // passing i var into square brackets works.. but that's not the point i want
   if (rPlayer.intersects(rGreenBorder[i])) {
          player.setX(BOARD_WIDTH - player.getWidth() - 15);
    }
}

Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (89 views)
2013-05-16 21:24:48

gouessej (119 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (125 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.111 seconds with 21 queries.