32,204 Topics

Member Avatar for
Member Avatar for JellyTurf

i really need help with this error. it is an unexpected types error [CODE]public class ticTacToeDemo { //use a 3X3 array for the game board. private static char[][] board = new char[3][3]; public static void main(String[] args) { int turnNumber = 0; System.out.println(board[1][1]); newGame(); while(!winner()) { turnNumber += 1; if …

Member Avatar for phoenix911
0
104
Member Avatar for Web_Sailor

Hi.. :?: I have written a program that reads a file and loads it into the 2D matrix but the problem is that it only loads the first line into 2D Matrix and duplicates the same. Can somebody point out the mistake. Here is my input file[CODE]14 12 5 4 …

Member Avatar for Web_Sailor
0
136
Member Avatar for vobiahu

i am trying to create a program that will enable me play the hangman game and I am not meant to use arrays. What should I do and how do I go about this. you get 5 tries and when your tries are all used you lose and then a …

Member Avatar for lafigueroa
0
84
Member Avatar for ndeniche

Hello guys... I'm trying to develop an application with a GUI that sends and receives data via http, by sending a url via POST and eading the content generated by the url. or instance, if i send a nick and order number, the server generates a SessionID via html. My …

Member Avatar for ndeniche
0
208
Member Avatar for mytime19

I am trying to draw stars/asterisks but i can't. Any idea? [CODE] import java.io.*; import java.awt.*; import javax.swing.JPanel; import javax.swing.*; public class kmd1234 extends JFrame{ kmd1234(){ JFrame f; JPanel p; JLabel l; int x,y; f = new JFrame("my frame"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); p = new JPanel(); p.setPreferredSize(new Dimension(512, 512)); p.setBackground(Color.WHITE); l = …

Member Avatar for mytime19
0
92
Member Avatar for GradStudent

Hi, I have a Entity Bean and A session bean facade. My Client side look up works fine and I am able to retrieve the .count() method results. But when things involve serialization, like .create() or delete() or edit(), java.lang.reflect.UndeclaredThrowableException comes up.. Any pointers will be appreciated [CODE] package eb1; …

Member Avatar for jwenting
0
166
Member Avatar for jenjenjenjen

Yes I am new to learning java. I am just learning loops. For my online college class I have to write a program using the for loops. This program needs to give all even numbers between 0-100. I have a program written that gives me all numbers 1-100. Can anyone …

Member Avatar for mytime19
0
126
Member Avatar for Lokeshmsit

I have a JInternalFrame painted with a BufferedImage and contained in the DesktopPane of a JFrame.I also have a JTextArea where i want to write some java code (function) that takes the current JInternalFrame painted BufferedImage as an input and after doing some manipulation on this input it returns another …

0
97
Member Avatar for iantoya

I'm making a rock paper scissor game in java mobile application. I am having a hard time coding on how to get a random value to output a certain message. And how do I produce a whole number? Not the decimal ones that. Thanks for the reply. [CODE]import java.util.*; import …

0
50
Member Avatar for beforetheyknew

Hi im still quite a terrible programmer, so some of this is just confirmation of stuff i think is right (and please correct me if i have the wrong idea!) How would you program an anogram maker ? I was thinking of breaking up a String with substring, and then …

Member Avatar for BestJewSinceJC
0
334
Member Avatar for jyotirmoy

Hi Everybody I am trying to play a MPEG4 Video in JMF over a HTTP server. I tried to write an applet to play this mpeg4 video over HTTP using javax.media package. So, can anyone tell me any solution for this problem? regards Jyotirmoy

Member Avatar for amduta
0
733
Member Avatar for lrolsto1

So, I am working on a project that uses inheritance. I have a class Creature, which extends Thing. Also, I have classes Tiger and Ant that extend creature. I also have a TestCreature class. All of these are in the same directory, and they all compile. However, when I run …

Member Avatar for Ezzaral
0
89
Member Avatar for haggis-man

I would like to send code along with my form to re-map a couple of keys. Specifically ... Right arrow key to act like TAB Left arrow key to act like Shift+TAB Is this possible please?

0
49
Member Avatar for ttboy04

Hello, I am trying output number of repetion from user request. So basically there will be repetition print out of the times table when the user enter in the "Enter repetition" dialogbox. For example in the "Enter repetition" dialogbox, i will enter 2, then in "Which timestable do you want" …

Member Avatar for phoenix911
0
100
Member Avatar for sid78669

Hey Everyone! I am writing a program for students and to keep it platform independent I have chosen to convert it to Java. Now, earlier I was using C# and with MS Visual Studio, I was able to write a plugin which would save all open ms office documents. I …

Member Avatar for masijade
0
149
Member Avatar for esy928

Greetings! I'm almost finished in creating a geometry wars like game (except that you cant move =P ). For the last few days I've been stuck doing the diagonal movement of the bullets. I wish someone could help me =D here's the constructor of the bullet class x & y …

Member Avatar for esy928
0
1K
Member Avatar for StephNicolaou

Hi all, I thought it would be quicker to design using NetBeans, but now I'm finding that it's more trouble to work with NetBeans automatically generated garbage 'code'. Anyhow, I've tried to remove its automatically generated code for the frame's scrollbar but that just totally messes up the layout of …

Member Avatar for StephNicolaou
0
109
Member Avatar for Tarli14

Output: Enter name: Ferrial P. Esber A - 1 B - 1 E - 2 F - 1 I - 1 L - 1 P - 1 R - 3 S - 1 Space - 2 Please reply ASAP, thank you very much

Member Avatar for javaAddict
0
86
Member Avatar for koeney

Hi guys I need help with my project I want to write a java code that determine if an expression is tautology or not e.g. P v Q -> R note that: v is or -> is implies i need a help how to start? do i need a truth …

Member Avatar for mytime19
0
85
Member Avatar for hinks

hi i wonder if any one can help i have to write a program in java were there is a server and client, what has to be done is that a number is entered on the clients side, which then goes to the server and if the number matches then …

Member Avatar for mytime19
0
86
Member Avatar for reebeca

hi, I am creating a mobile application, where I want to fetch a set of data from the database and put it in the xml file dynamically and then display it in the mobile console, so tat i don need to fetch the data from the database again and again,I …

0
49
Member Avatar for beGinneR24

Hello, i have to create a java program that calculates a polynomial, kinda. the key question i have is i dont understand what this is asking me right here, and if i am understanding it right, why is it not working? this is what it is asking me Create a …

Member Avatar for beGinneR24
0
103
Member Avatar for tjsail

Hey Everyone... Not quite sure how it works on these forums as this is my first post, but I am looking to separate elements of lines printed to a text file in real-time for a log parser. An example of the text output is: [INDENT][CHAT WINDOW TEXT] [Sun Nov 29 …

Member Avatar for rohini.vangury
0
515
Member Avatar for Mattpd

I am attempting to initialize an int[] array of 10 random numbers. Then choose a pivot value from the array. I then place this value in the first position of the array. Then call quicksort on the array, which will call a partition method. This method returns the final index …

Member Avatar for Mattpd
0
109
Member Avatar for pateldeep454

I have this code: [CODE] public static int pow (int x, int n) { if (n==0) return 1; int t = pow (x, n/2); if (n%2 == 0) { return t*t; } else { return t*t*x; } } public static void main(String[] args) { System.out.println (pow (5, 2)); } [/CODE] …

Member Avatar for pateldeep454
0
119
Member Avatar for kooldba

I have two text files which are similar but with different tags: File 1: [code] Ben|2 Jen|4 Harry|8 Bill|3 Jack|2 Jill|2 Rip|1 P|1 A|3 B|4 C|2 G|5 Tom|1 Harr|4 Red|4 Green|2 Red|3 Blue|4 Lent|4 Burrow|2 [/code] File 2: [code] Ben|2 Jen|5 Harry|2 Bill|4 Jack|3 Jill|6 Rip|1 P|2 A|19 B|0 C|1 …

Member Avatar for kooldba
0
265
Member Avatar for laelzio.mosca

Hi, I`m making a temperature program, the program takes the temperature F and prints the equivalent Celcius temperature. and VS. The temperature is a double, but I get too many numbers after the decimal poit, like( 45.67777777...) I`d like to set it to only one or two numbers after the …

Member Avatar for laelzio.mosca
0
135
Member Avatar for squigworm

Hello everyone, I am writing a simple program for homework that processes the users income taxes. Part of the assignment is to allow the user to process a second user if they desire. My problem is that when the user elects to go ahead with round number two. The program …

Member Avatar for squigworm
0
107
Member Avatar for Katana24

I've created a simple GUI that's purpose is to square or cube a given number that the user enters into the textfield. This all works fine but what I now want to do is to fine-tune it by testing the input. For example if the user enters a non-numerical value …

Member Avatar for Katana24
0
82
Member Avatar for mahdi68

Hi how can i get linux distributions name in java ??? i try it by Syatem.getProperty("os.name") but this return only "Linux" !!! is any way to return like fedora , suse , ... ??? thanks

Member Avatar for chaospie
0
94

The End.