473,440 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,440 software developers and data experts.

Need help to make A Hangman

Ok hes the thing u no public class thats how i gotta make it in JCreator and i dont even no where to start if anyone could give me some pointer or make the code and i use bits and piece That would really help that would be Great Thanks!!
ps its in JCreator and i a real new at this so if you do make it with code try and make it easy like only 1-3 hangman words so a shorter game lol and easy code if that makes sence lol like the Words Keyboard ,Mouse ,and i dono speaker or something
Jun 1 '07
57 13298
DeMan
1,806 1GB
What line number do those errors appear on?
Jun 5 '07 #51
umm 23 and 42 but there is nothing on 42?
Jun 5 '07 #52
DeMan
1,806 1GB
what does this do? :
Expand|Select|Wrap|Line Numbers
  1. java.net.URL imgURL = golfball.jpg(path);
  2.  
In fact, as far as I know, each time you use golfball.jpg it should be in guotation marks, eg:

Expand|Select|Wrap|Line Numbers
  1. JLabel2 = new JLabel("golfball.jpg");
  2.  
Jun 5 '07 #53
what does this do? :
Expand|Select|Wrap|Line Numbers
  1. java.net.URL imgURL = golfball.jpg(path);
  2.  
In fact, as far as I know, each time you use golfball.jpg it should be in guotation marks, eg:

Expand|Select|Wrap|Line Numbers
  1. JLabel2 = new JLabel("golfball.jpg");
  2.  
thats what i had but Blaz told me to get it off the site i had
import javax.swing.*;
import java.awt.*;
public class BackUp
{
public static void main(String args [])
{
JFrame jf1 = new JFrame("This Is the First Frame");
JLabel lbl1 = new JLabel();
JLabel lbl2 = new JLabel();


jf1.setSize(500,500);
Container c = jf1.getContentPane();


ImageIcon icon = new ImageIcon("Golf.jpg");
lbl1.setIcon(icon);

c.add(lbl1);

ImageIcon icon2 = new ImageIcon("golfball.jpg");
lbl2.setIcon(icon2);



c.add(lbl2);
c.add(lbl1);

jf1.setVisible(true);



}
}

But only one image wou;ld pop up i cant get both of em
Jun 5 '07 #54
DeMan
1,806 1GB
have you tried adding Lb1 (the golf course) FIRST and then adding lb2.....

The way you have it, the ball is placed on teh screen THEN the course (potentially over the top)
Jun 5 '07 #55
Yea when i switch them then the other one appears on top and the other one disapers its confusing
and i have to have to have the ball on the course tommoro lol
Jun 5 '07 #56
DeMan
1,806 1GB
You may like to have a look at This thread, it seems that someone has had a similar problem
Jun 5 '07 #57
blazedaces
284 100+
what u mean container class documentation
Every single variable you call that isn't a primitive type (that is an object since all classes are extended off object, hence object-oriented) is a class.

You wrote Container c = bla bla.

Search java class container. Look at java's documentation, it explains all of the class' methods and variables, etc. There's something about setting the layout and if you actually tried to look at the various tutorials available at sun's website you'd have noticed a whole lot about layouts. Layouts allow you to place different objects, usually labels or frames at different "positions" if you will. You can order them horizontally, vertically, any combination you can think of and you can add spaces, etc.

I have a feeling to show more then one object you may need to have a layout (I know that in QT, a GUI-aiding library for C++, this was true).

Please attempt to figure out how this works using the tutorials and truly understand them before you give up and simply post your code here again.

Thank you, and good luck,

-blazed
Jun 6 '07 #58

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: tigrfire | last post by:
So I'm trying to write a hangman game and the output is coming out a little strange. Here's my code thus far: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> ...
18
ilikepython
by: ilikepython | last post by:
Hi I'm new to Python(3 to 4 days) and I'm working on a hangman game and have been having some problems that really annoy me. Here is part of my script: c = input('Would you like to play hangman?...
4
by: princessfrost | last post by:
Hi! I was wondering if someone could please help me with a hangman program that I have to do. I have some ideas, but really don't know what to do or where to start. My program needs to be:...
2
by: tesa | last post by:
I am not able to figure out how to make this work. I am trying to create a hangman game. I am in a basic javascripting class. I am to only use very basic code as you can see. I am able to use any...
5
by: av3rage | last post by:
I have never done any programming in my life but I have decided to go into engineering and in doing so we have to take this intro to programming course and I am pretty clueless. I am starting to get...
8
by: tidiz | last post by:
Hi, I'm trying to make a hangman game that should look like this: Welcome to Hangman ______ Your guess: c Success! __cc__ Your guess: b
1
by: AlexSc | last post by:
Hi to All, I am doing on a hangman project, Where this is a very simple one, where player would guess the word and if it is correct the letter would be from "-" to the correct letter once all...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.