32,199 Topics

Member Avatar for
Member Avatar for Hodson

I have created a very simple Tic Tac Toe game using NetBeans 6.8. Swing is used in order to create the grid. I can build and run the game with no problem. What I now want to do, is have this uploaded onto a website (along with other applications I …

Member Avatar for Hodson
0
261
Member Avatar for Rekuta

Hi everybody ! I am trying to use a different image using a keyboard input such as this: private ImageIcon GameIcon = new ImageIcon("f:/School Programmation/Dungeons of Darkness.gif"); private ImageIcon GameIcon2 = new ImageIcon("f:/School Programmation/untitled.gif"); public RPG18() { setLayout(new FlowLayout(FlowLayout.LEFT, 10, 20)); add(keyboardPanel); keyboardPanel.setFocusable(true); add(new JLabel(GameIcon)); repaint(); } and here's the …

0
36
Member Avatar for bryan69

hi guys, i would like to develop a file monitoring system to detect if the files got edited or copied to an external device etc. currently, i can monitor if the file got edited or deleted.However, if the file got copied, it would not be able to. any suggestions?

0
55
Member Avatar for garnier4i

hi i am a beginner in java language...the below program has should close the window created but it is just minimising,and maximasing the window i am using Edit+ v3.12 [code]import java.awt.*; import java.awt.Label; import java.awt.AWTEvent; import java.awt.event.WindowEvent; public class HowdyByeWindow extends Frame { public static void main(String args[]) { new …

Member Avatar for JamesCherrill
-1
108
Member Avatar for nagesh1811

acutally above code is sorting employee class objects based on EmpID or based on EmpName but my requirement is if know the comparator (on which basis sorting should occur) @ runtime how can we achieve that :)[code]package CollectionsOps; import java.util.Arrays; import java.util.Comparator; /** * * @author King@java */ class employee{ …

Member Avatar for javaAddict
0
190
Member Avatar for ubi_ct83

Hi guys, want to discuss with u guys and begging your opinion or suggestion to solve my problem. i have this input input[0]={0,1,2,3} input[1]={0,1,2} input[2]={0,1,2,3} input[3]={0,1} value=2,3 and when value=3,binary binary[0]={0,1,1,1} binary[1]={1,0,1,1} binary[2]={1,1,0,1} binary[3]={1,1,1,0} and when value=2,binary binary[0]={0,0,1,1} binary[1]={0,1,1,0} binary[2]={1,1,0,0} binary[3]={1,0,0,1} if user choose value=2,result should b like this: (i …

Member Avatar for ubi_ct83
0
78
Member Avatar for luttinj

Hello, I am making a show quiz show applet in Java and I am now basically done it, all I need to finish it off and make my teacher happy is to find out how i would get the applet to show the user what their score is at when …

Member Avatar for BestJewSinceJC
0
157
Member Avatar for skyzer

I have ordered points(x,y) for a route and i got a method optimize which removes consecutive points which distance between them is less than delta (delta=3). The first rule tells that if p1 and p2 distances are lower than delta, then remove p2 from my route. Second rule is same …

Member Avatar for BestJewSinceJC
0
107
Member Avatar for Democles

I'm am currently attending college and taking a java programming class. I am somewhat stumped. I get thrown in a situation and need to figure out the answer, now I do have some programming experience and in this case, my thinking would be to use a iterator. I do not …

Member Avatar for BestJewSinceJC
0
117
Member Avatar for SebFr

Hi, I want to be able to call a Javascript file from a C# Windows Application. This is just a stand alone C# application. What I want to be able to do is to execute this JavaScript file, think of it as a function, and be able to pass parameters …

Member Avatar for kvprajapati
0
2K
Member Avatar for ceyesuma

I have been trying to find how to set a property for a derby connection to have a prepared statement perform several INSERT queries. it was suggested that this may be possible. [QUOTE]Are you trying to execute multiple statements with a single sql string? If so, have you activated the …

Member Avatar for masijade
0
115
Member Avatar for ku95

Im currently working on a Connect4 progrqam and I'm trying to convert a string into an integer. You will see that it is under the Connect4View. Its really frustrating as I'm struggling to find a way round this. Is there a possible solution to this and can someone please tell …

Member Avatar for ku95
0
160
Member Avatar for RossMc

Hi, I need to create this Carpark application that looks like this [url]http://i35.photobucket.com/albums/d171/rossmc/java-1.jpg[/url] I have got the buttons to work but when I try to make the grid it is not showing with the buttons when I run it. This is the code I have so far. Does anyone know …

Member Avatar for masijade
0
130
Member Avatar for AFB

this erorer message appear to me when i run projact --------------------Configuration: afb - JDK version 1.6.0_17 <Default> - <Default>-------------------- Exception in thread "main" java.lang.StackOverflowError at sun.awt.Win32GraphicsConfig.getBounds(Native Method) at sun.awt.Win32GraphicsConfig.getBounds(Win32GraphicsConfig.java:215) at java.awt.Window.init(Window.java:393) at java.awt.Window.<init>(Window.java:432) at java.awt.Frame.<init>(Frame.java:403) at java.awt.Frame.<init>(Frame.java:368) at javax.swing.JFrame.<init>(JFrame.java:158) at Convert.<init>(Convert.java:10) at Convert.<init>(Convert.java:115) at Convert.<init>(Convert.java:115) at Convert.<init>(Convert.java:115) at Convert.<init>(Convert.java:115) at …

Member Avatar for quuba
0
240
Member Avatar for bigsurya
Member Avatar for bettybarnes

hi guys i'm having a problem on how to view my background it should be like this [URL=http://img148.imageshack.us/i/applet.png/][IMG=http://img148.imageshack.us/img148/9121/applet.png][/IMG][/URL] Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL] the pacman/pink.jpg should enter the house, but how im so lost in this, i dont have an idea...anyone please help me... here's my code [CODE]import java.awt.*; import java.applet.*; public …

0
38
Member Avatar for MrBlack

I m using NetBeans IDE6.8 to create a application.for this i use Japplet form . when i darg and drop buttons and textbox, i cant give them a static position.when i move a textbox some other textbox or label also go here and there, how can i prevent this , …

Member Avatar for cale.macdonald
0
56
Member Avatar for PhiberOptik

Hello, I'm working on a web scraper of sorts, my main goal is data, I was wondering what a good, efficient way of organizing the data that I'm downloading is? Here is what I have, I download the webpage, and ends up as a FileReader object, then I send it …

Member Avatar for cale.macdonald
0
113
Member Avatar for Demon_singh

Could anybody help me with this code 1. want to read a file into an array. 2.three button should sort it 1st product name should sort it alphabetically, 2nd maximum stock level which sort by maximum value, 3rd price sort by maximum value on the top. thanx cheers Demon

Member Avatar for moutanna
0
107
Member Avatar for evak77

I have this program that is giving me some trouble, can anyone tell me what is wrong. This is the error i am getting trying to run program java.lang.NoSuchMethodError: main Exception in thread "main" Exit code: 1 There were errors

Member Avatar for JamesCherrill
0
48
Member Avatar for KONTOL

public class AddPlanePanel extends JPanel implements MyObserver { private JLabel planeLabel = new JLabel("New Plane "); private JLabel nameForPlane = new JLabel("Name:"); public JTextField inputPlaneName = new JTextField(15); private JButton button = new JButton("Add"); private JLabel status = new JLabel(); private JLabel typeLabel = new JLabel("Type:"); private String[] typeStrings = …

Member Avatar for moutanna
0
181
Member Avatar for fabunmi adeniyi

this code runs succesfully onnet bean, though it compiled in prompt but compiler is telling me that it is not checked[code]import java.io.*; import java.util.*; class RandomSelection { public static void main(String[] args) { try{ FileInputStream fstream = new FileInputStream("c:\\filea.txt"); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); …

Member Avatar for moutanna
-1
121
Member Avatar for flyingcurry

I tried using this code below[CODE]if (choice == 6) main (); //takes the user back to the main method to the Main Menu[/CODE] but it won't compile. error message: [QUOTE]No applicable overload for the method named "main" was found in type "movitetogo". Perhaps you wanted the overloaded version "void main(java.lang.String[]args)throws …

Member Avatar for fabunmi adeniyi
1
3K
Member Avatar for kalaiselvi.v

File file = new File("filename"); FileInputStream fis = new FileInputStream(file); len = (int)file.length(); //prepared stmt st.setBinaryStream(1, fis, len); I have uploaded the file into mysql database from servlet program. But how to read that file or tell me how to upload a doc into the database.

Member Avatar for electricrain
-1
918
Member Avatar for Amoryethel

This is my first post here, so excuse me if I'm not posting my question in the correct format. I'm trying to make a program that determines whether the score entered is passing (higher than 70.0) or failing (lower than 70.0). The array I'm using needs to be declared as …

Member Avatar for moutanna
0
105
Member Avatar for sreenivas.m41

hello, can any one help me ,i am not getting mysql datbase values from server, to my system through applet it display all values null....but locally the program getting the values is there any browser settings..or any thing need i have to do pls help me................

0
15
Member Avatar for Chaster

Hi all, I have two strings, in which the order of words may differ. I would like to hash both of them and obtain the very same hash code for them. So I need a hash that returns the same value for "Hello world" and " world Hello". Does such …

Member Avatar for javaAddict
0
77
Member Avatar for Raghav686

The requirement is to have an applet which refreshes it self every second. I have created a thread for this purpose. I am using paint function to display all the values within a rectangle. The problem is that 1.i am not able to call paint() function from run(). 2. The …

0
29
Member Avatar for the_preface

I'm writing a program which accepts the price of a tour. A tour is priced between 29.95 and 249.99. It's supposed to repeat until a valid price is entered... However, even when it is, the program continues to repeat. Here's what I have so far. [CODE] import java.util.Scanner; import java.util.InputMismatchException; …

Member Avatar for the_preface
0
124
Member Avatar for lotrsimp12345

Here's the assignment: You are to create a single server (in either Java or C/C++) which can service both C/C++ and Java clients. The protocol of the server is as follows: 1. The client contacts the server. 2. The client performs a single send of a data packet containing the …

Member Avatar for moutanna
0
997

The End.