Search This Blog

Plane Shooter Game for PC -Java Game Project with Source code

tank shoot down bomber planes free java game Multi level using Greenfoot .Plane Shooter is a single player lightweight Java game for Computers. It is a 2D game that works well even on  low end computers. The game size is only a few Kilobytes. You play as a tank and shoot down planes and what they drop. The game is in 7 or more levels. This is my first complete Greenfoot project. The source code of this game is also uploaded for those who want to see.

PanzerFight - Two player Action Game (Java Game) For Any OS

multi player Tank fight game free download for Windows Linux MAC and Solaris in Java Greenfoot platform mines shoot
PanzerFight is an interesting two player game for PC. The game is played between two players on same computer (can be on same keyboard). Each player controls a tank. The tanks can plant land mines or fire each other. Ammunition and health are supplied at times. The game is interesting since it is a multi player game. This multiplayer shooting game is supported on, Windows, Linux, Solaris, Mac etc. The game is developed in Java platform (using Greenfoot). JRE (Java Run time Environment) is a prerequisite to run this game.

How to Change Image in JButton in Java - Set Icon of JButton

In this post we are discussing how to change the image in button in Java. There may be situations in
change jbutton image java jbutton image jbutton background image jbutton image icon how to add image to jbutton in java swing jbutton picture adding image to jbutton add image to jbutton
Jbutton with Image set
programming where we want to know how to set JButton image in java or to change button icon in java. The java code to change the icon of a Jbutton is so short. We use the
setIcon()
method in JButton class. The setIcon method takes an ImageIcon object as an argument. I will show you a sample java code in which the icon of  button is set. First of all,  you have to copy the icon image (jpg, bmp, png or gif image) to the src folder in the project directory. You may also place it in some folder inside the src folder. If you are using netbeans IDE, you can simply drag and drop the image file into the desired folder in the projects pane. After copying the icon image to src folder (or any subfolder in it), use the following code to set it as the button's icon.
playbtn.setIcon(new ImageIcon(getClass().getResource("/manhaj/images/play.png")));

Online Mobile Recharge Simulation Application in Java

Here i am adding an online mobile recharge application. It is coded in Java. It is a java desktop application using pure java only and simulates online mobile recharge. It is done using Netbeans IDE. I am posting the link to the netbeans project file (zip archive). You can simply download it and extract it to see it using notepad or Netbeans IDE. This is a simple java SE desktop application using files to simulate online mobile recharge and online payment using debit card or credit card. Input validation, reading or writing objects from or to files, using arrays (ArrayList) of objects, displaying or showing multiple lines using JLabel, using HTML formating for JLabel text etc are features. Download Netbeans Project (Java Source code) for Online Mobile Recharge Simulation application

How to Display Multiple Lines in JLabel

multiple lines of text i JLabel, Java source code. Java code to display multiple lines in JLabel. HTML formatting in JLabel Java.
HTML formatted multiline JLabel
Jlabel is actually intended to show single line of text. But you may sometimes ask how to make JLabel to display multiline text. It is possible for JLabel to show multiple lines of text. JLabel in Java can show HTML formatted text. This ability of JLabel can be used to extend longer text onto next line. The following lines of code is an answer for the questions like 'is there a multi-line JLabel' or 'how to display multiple lines using JLabel. Simply, look at the sample code:
JLabel lbl_Multiline=new JLabel();
lbl_Multiline.setText("<html>This is my long text to display with JLabel....</html>");

How to Change Shape of JFrame - Rounded Rectangle, Circle, Ellipse etc

You can change the shape of the JFrame. By default its shape is rectangular and assumes the size set using setSize() method. In this post we will discuss how to change the shape of  JFrame. You can change JFrame's shape into rounded rectagle, cirlce, ellipse, etc. We will see how to set the shape of JFrame with java code sample and screenshots. To change the shape of JFrame to any shape, we use the setShape() method.

Prerequisites

There are some prerequisites for setting or changing the shape of JFrame. They are:
The Frame should be undecorated. You should call the setUndecorated(true) method before calling setShape() method. When you set the frame undecorated, you will lose the title-bar,close button, maximise and minimise buttons. So you will have to create these button syourself.