Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
  JavaGaming.org - Pastebin



Author: DarkCart (posted 2014-11-01 14:51:03, viewed 871 times)

1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31  
public class ImageTest extends BasicGame {
   private static final long serialVersionUID = 1L;

   Window win;
   
   public void init() {
      win = new Window();
      win.createWindow(640, 480, "Image Test", false);
      
      win.addTool(this);
   }

   public void paint(Graphics g) {
      GL gl = new GL();
      gl.glInit(g);
      gl.glBackground(ColorValue.lightGreen);
      gl.glText("Minicraft", ColorValue.black, 290, 10);

      GLImage img = new GLImage();
      img.glLoadImage("player_16x16.png");
      img.glDrawImage(gl, 250, 140, 64, 64);

      img.glLoadImage("creeper_16x16.png");
      img.glDrawImage(gl, 300, 140, 64, 64);
   }

   public static void main(String[] args) {
      ImageTest t = new ImageTest();
      t.init();
   }
}





Dump your java code here :



Special syntax:
  • To highlight a line (yellow background), prefix it with '@@'
  • To indicate that a line should be removed (red background), prefix it with '-'
  • To indicate that a line should be added (green background), prefix it with '+'
  • To post multiple snippets, seperate them by '~~~~'
  EOF
 
Riven (439 views)
2019-09-04 15:33:17

hadezbladez (5297 views)
2018-11-16 13:46:03

hadezbladez (2213 views)
2018-11-16 13:41:33

hadezbladez (5565 views)
2018-11-16 13:35:35

hadezbladez (1156 views)
2018-11-16 13:32:03

EgonOlsen (4592 views)
2018-06-10 19:43:48

EgonOlsen (5467 views)
2018-06-10 19:43:44

EgonOlsen (3128 views)
2018-06-10 19:43:20

DesertCoockie (4023 views)
2018-05-13 18:23:11

nelsongames (4741 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!