35,618 Topics

Member Avatar for
Member Avatar for hacknayan

My problem is that the image is not showing on my java. here is my code MyGame.java [CODE]package mygame; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MyGame extends JFrame { Container c; Player p; MyGame() { this.setTitle("My Game"); this.setSize(600, 400); this.setLocation(100, 100); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); c = this.getContentPane(); p = new …

Member Avatar for hacknayan
0
142
Member Avatar for coco24

Is anybody familiar with using ObjectEditor in Eclipse? I am working on a program and I need serious help.

0
45
Member Avatar for CoolPrizes

So I need help on how to calculate how much change to give back to a customer. I need the program to give change in the least bills and coins as possible. Ex. Customer's item costs $13.37. He/She pays $20. Program gives back: One $5 Bill One $1 Bill Two …

Member Avatar for CoolPrizes
1
7K
Member Avatar for SasseMan

Hello! I have a swing app with lots of components and stuff. I want to place a Container/Jpanel on top of everyting else that is invisible that contains other component which are visible. I can make the panel invisible or not opaque and still show its child component but I …

Member Avatar for mKorbel
0
950
Member Avatar for Java2011

Hey guys basically I'm studying programming using the 'BlueJ' Java program on windows. I'm trying to create a 'Dynamic Billboard' program that asks a user to enter a 5 letter word than the characters are displayed on a billboard, the program uses a text file imported for the charcters). Ive …

Member Avatar for NormR1
0
168
Member Avatar for murkycrimson

I'm having trouble debugging one of my methods. The class Student inherits a class called Person and the methods are called in the main program, TestStudent. I'm trying to create a method that lets the user sort an array of grade averages in ascending order but whenever I try, I …

Member Avatar for JamesCherrill
0
248
Member Avatar for Jessurider

i 've got a steganography project in java.......in that we can hide text within pictures and videos......but the major disadvantage is that the hidden data is been destroyed when the image or the video is further modifies with the hidden data............is it possible to do a steganography project in java …

Member Avatar for Taywin
0
270
Member Avatar for clickclack

Hopefully someone can help me...I'm a student taking my first Java class. We are working on classes (building them). For this assignment the teacher gave us a test program that we have to build a class for to computer some basical mortgage calculations. Below is the class I built that …

Member Avatar for Ezzaral
0
207
Member Avatar for Dmiller071

Hi all, For my java class I need to make the game of life. So far I have 2 main classes that drive the program (ignoring GUI class for now.) My main classes: Cell(x, y) - where x = the x coordinate and y = the y coordinate of the …

Member Avatar for Dmiller071
0
113
Member Avatar for alliswim2010

Hello I'm having major issues, please help me with this code; (Generating random characters) Use the methods in RandomCharacter to print one hundred uppercase letters and then one hundred single digits, and print ten per line. Use these methods: public static char getRandomUppercaseLetter(){ return getRandomCharacter('A', 'Z'); } public static char …

Member Avatar for alliswim2010
0
694
Member Avatar for nyemba

I'm having trouble sorting names in alphabetical order using counting sort, forinstance Gregory John, Alex Smith, Adam Richard, Alex Ryan Output hould be in this order Adam Richard Alex Ryan Alex Smith Gregory John My code so far [code] import java.util.ArrayList; import java.util.Scanner; public class Names { //private static int[] …

Member Avatar for Taywin
0
375
Member Avatar for dangari

I have had a working jsp web applicationg for the last 2 months. All of a sudden, the application was not allowing users to log into it. After monitoring the logs upon a manual restart of glassfish, I saw the log output below: [CODE][#|2011-06-25T15:58:55.376+0300|WARNING|glassfish3.0.1||_ThreadID=26;_ThreadName=Thread-1;|Error sending syslog packet java.net.SocketException: Too many …

Member Avatar for masijade
0
627
Member Avatar for anand01

hi all, I am accessing the database by MVC model now i need to create list box , list options already in database .What should I do should i connect database with jsp directly or any option available. Thanks

Member Avatar for anand01
0
93
Member Avatar for priyasubh

Hi.. I have downloaded a code to add JRadioBuotton to JTable, modified it.Please see the code..What i wanted was to have blank cell...i was getting a NullPointerException for this so i tried adding a JTextBox for instead. When I click on only radiobuttons the code works fine.. if i click …

Member Avatar for mKorbel
0
1K
Member Avatar for nickmi

[CODE]public GuiPrototypeScreen1() { GuiPrototypeScreen1Layout customLayout = new GuiPrototypeScreen1Layout(); Object[] possibleValues = { "Search", "Contribute" }; Object selectedValue = JOptionPane.showInputDialog(null, "Do you want to ", "Welcome", JOptionPane.INFORMATION_MESSAGE, null, possibleValues, possibleValues[0]);[/CODE] Hey guys i need help because i am completly stuck. All i want is when a string is selected to redirect …

Member Avatar for mKorbel
0
152
Member Avatar for raul8

Hello, I'm not able to access jar files from servlet. Although I have imported all the class file and made the jar file available in build path. [CODE] protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); cmd = request.getParameter("cmd"); System.out.println(cmd); String output = runCommand(cmd); …

Member Avatar for peter_budo
0
360
Member Avatar for CodeAerial

The output is obtained from a JPasswordField and placed into a text. But whenever I enter a new input on the field, it just shows the recent one I've entered... Ex: I enter "test1" as a password. When I enter a new one, say "test2", it only shows "test2" in …

Member Avatar for CodeAerial
0
144
Member Avatar for Samar Sharma

hay this is samar here actually i have to get values from tha my sql foe a perticular string which i pass through a xt box i think i'm not able to pass the vehicle no. to the querry this is my cade pls help [code]package p2c; import java.awt.Container; import …

0
68
Member Avatar for zmstevens

I am a first time user to Java and I am stuck and cant figure out what to do.. Please help. My code is [code] import java.util.Scanner; public class rshomework2 { public static void main ( String[] args) { Scanner input = new Scanner(System.in); sales; final double base = 800; …

Member Avatar for Zaad
0
359
Member Avatar for vaironl

Hello forum, Vaironl here. I have to do an assignment for school and I was about 3 hours designing the prototype and everything was going right but I had to add arrays and a for loop to my system and after that everything just got ugly. Therefore I started from …

Member Avatar for vaironl
0
3K
Member Avatar for 918_Nix

I wrote a bit of code at school using a copy of Net Beans that they have installed on the computers in the lab at my school. I saved my file to my thumb drive as Lab2.Java. When I got home I opened my copy of Net Beans 7.0.1 and …

Member Avatar for 918_Nix
0
274
Member Avatar for msPriesterM

Hi, I haven't seriously written Java code in over 5 years. I am looking to find good online resources to help me refresh in a few weeks. Thanks! Marquita

Member Avatar for NormR1
0
148
Member Avatar for moparman426

alright iam working on this code and it is driving me nuts someone please help me alright here is my code :[CODE]import java.util.Scanner; public class TestScoreApp { public static void main(String[] args) { // display operational messages System.out.println("Please enter test scores that range from 0 to 100."); System.out.println("To end the …

Member Avatar for hfx642
0
159
Member Avatar for isebas

I have to write a code that will print out the sum of all numbers between 1 and 100 that 7 and 5 go into evenly. I can't really think of how to write it. This is what I have but it doesn't work.[CODE] import java.io.*; public class work {public …

Member Avatar for hfx642
0
184
Member Avatar for chiiqui

Yes, I've already checked the pinned thread, all of the suggested books there are for Core java Kindly post good books for J2EE thanks :)

Member Avatar for Ezzaral
0
126
Member Avatar for javaNooblet

Hi all, I am having trouble with class communication to reset some textfields through event handling. Any help would be appreciated. Here is a portion of my code. [B]The class that contains the textfields that I wish to use a reset button for:[/B] [CODE]import java.awt.*; import javax.swing.*; import javax.swing.border.*; public …

Member Avatar for mKorbel
0
214
Member Avatar for cse.avinash

Hello..! I am newbie to java and I have got frustrated using notepad, can anyone please suggest me a good compiler for java. I am using Windows 7 as O.S.

Member Avatar for hszforu
0
110
Member Avatar for G_S

Hello. I recently started studying Java and OOP. I am currently creating a class that writes text to a file in a particular format. I have 'finished' it, and it works, but I am unsure as to the quality of the implementation. This is how it works: * First of …

Member Avatar for ~s.o.s~
0
211
Member Avatar for ferretfool0x77

I have a two-d array from which I need to read values from any and all sides of each index. for example [CODE]int x=0, y=0; myArray [x - 1][y - 1];[/CODE] where x-1 and y-1 would be the values of the other end of the array. I've been up over …

Member Avatar for Taywin
0
1K
Member Avatar for jcooler

A quantity known as the body mass index (BMI) is used to calculate the risk of weight-related health problems. BMI is computed by the formula BMI = w/(h/100)^2 Where w is weight in kilograms and h is height in centimeters. A BMI of about 20 to 25 is considered “normal.” …

Member Avatar for chiiqui
0
214

The End.