32,199 Topics
| |
in this code i have logical error its give me wrong output [CODE]import java.util.Scanner; public class OneFile { static final int MAX = 100; static final int READ = 10, WRITE = 11, LOAD = 20, STORE = 21; static final int ADD = 30, SUBTRACT = 31, MULTIPLY = … | |
I have to do this project for school that finds the Standard Deviation. The first part of it, which has to build an array from scanner with a while loop, has been killing me today. The problem is that my teacher wants a program that will allow a user to … | |
Trying to add a key keylistener to a program i am making but it wont work. cant find the reason :/ any help would be awesome:) Display.class [CODE]package com.mono.main; import java.awt.Graphics; import java.awt.Graphics2D; import javax.swing.JFrame; import javax.swing.JPanel; import com.mono.main.handler.Controller; import com.mono.main.handler.Game; import com.mono.main.handler.InputHandler; public class Display extends JPanel implements Runnable … | |
hello all how to make window's short cut that call command line: java javaclassname.java thank you denny | |
Hey - Sorry if this is an irritatingly simple problem, but I'm a newbie to the Java language and I can't see where I'm going wrong with this. I get an error with my code when trying to define 'label3' - "cannot find symbol - class Jlabel". It seems to … | |
I am having difficulties with placing images on Buttons using Java Swing. I have placed all images in a package named icon. The frame is loading as well as the buttons. I cant seem to get the images on the buttons. Can anyone point out my mistake please. [CODE]public Launch(){ … | |
//create the images folder and past all images into that u want to display... import java.awt.Color; import java.awt.Dimension; import javax.swing.ImageIcon; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingConstants; class my { public static void main(String args[]) { JFrame f=new JFrame("Web layout..."); ImageIcon pic1 = new ImageIcon ("images/3d.png"); ImageIcon … | |
my program freezes when I put this code on a button, but when I put it in the main it doesn't what could be the problem? protected void EstablishClient() { try { skt = new Socket("some.ip.of.me", 4444); out = new PrintWriter(skt.getOutputStream(), true); in = new BufferedReader(new InputStreamReader(skt.getInputStream())); txtRecvd.append("Received string: '" … | |
I am trying to import all the classes present in a user defined package, by using the statement as import mypack.*; but it's not working in my program. [B][B]Its Giving error : C:\Users\Nitin\java>javac AOTest.java AOTest.java:6: cannot access AOperation bad class file: .\AOperation.java file does not contain class AOperation Please remove … | |
The title says it all. Basically what I'd like to do is have a JComboBox drop down with a list of items. When the user clicks on that item it will redirect them, or open a new browser tab, of the url to that specific item. Quick example (these sites … | |
Hey guys I have to write this program for AP Computer Science. It involves writing a main where it brings in a txt file with values, and reads all of them. Eventually, I have to modify it to read the values in to an array. Right now, I can't get … | |
| Hi all, I'm a long time reader of the forums and thought this would be a good place to ask a question. For the record, I am very new to Java! Basically, I have a [I]MainClass[/I] which inherits JFrame, the constructor for which sets window size, title etc. It also … |
hi Friends can you pl help me to create a simple snake game. give me with step by step creation. thanks. | |
Hi I have a class which has alot of tasks related to multiple classes. the tasks are add, modify ,delete, write on a file and read array from a file.all theses methods operates on objects of other classes as a member variables. In other words, I have to perform a … | |
Hi i am looking for simple intranet project in java with mysql.Can anyone post this kind of project or suggest some sites. Appreciated if u replay on this. Cheers! | |
I want to extend JFrame needed for my GUI program but i get this.. [URL="http://imageshack.us/photo/my-images/209/screenshot20111226at163.png/"]http://imageshack.us/photo/my-images/209/screenshot20111226at163.png/[/URL] how do i solve this? | |
Hi every body How to find smallest number and how many occurrence with the user input numbers until enter 0 ? this my code ....... [CODE]package javaapplication101; import java.util.Scanner; public class JavaApplication101 { public static void main(String[] args) { int num = 0 , min = num ; int count=0; … | |
Hello, I'm new in Java and this is my first post here. I was doing my homework but faced the following error: [QUOTE]c:\java\my box\Login.java:25: variable p might not have been initialized if (p == pass) { ^ 1 error[/QUOTE] You can see the main code bellow: [CODE]import java.util.Scanner; public class … | |
i m doing jdbc in sql server. when i have installed it then it is asking for connection. in server column what i need to write ? by default "(local)" is there and when i press connect button, it says "error reporting!!" and some description about that. what is this … | |
Hi, Can anyone please help me in resolving this issue. I have an eclipse galileo IDE . In that i m trying to test the web service in the web services explorer. [url]https://ccmuat.ultimatix.net/scpghd/servicerequest.asmx?wsdl[/url] .... this is URL. But i m facing an error when testing this URL ERROR : IWAB0379E … | |
Good Evening i hope i will be clear and fully details. i have created a web service project on netbeans using soap technology. i am using xampp mysql to create 5 different simple hotel databases. from my project i am connecting with jdbc connector succesfully only to 1 database. that … | |
i created a loop and it doesn't run: [CODE] for ( int i = 0; i < 100; i++) { for( int j = 0; j < 100; j++); { int total = i + j; } System.out.println( total ); }[/CODE] | |
hello! i m doing advance java now. and i m not getting any solid book for reference to read. actually, what i want in book is that it must have sample problem given with each concept! means it should be too explained. please refer a book from which i can … | |
Hi,/ I want to start with Java Application for Data Hiding in which image is kept as watermark.I want to start with this app but I have no idea how to start with it..I am vc++ programmer but i m not familiar with java so plz If u could help … | |
hi how can i deleting all linked list elements using ADT please i need the ideas ?? | |
I want one TextField on Applet and user enters URL in that TextField and then displays the document of the URL string in a new browser window. | |
hi i was writte program that implement one-d array user enter 10 element without any duplication it is give me all element its already exist [CODE]import java.util.Scanner; public class Duplicates { public static void main(String[] args) { Scanner input = new Scanner(System.in); int[] array = new int[10]; int[] copyarray = … | |
i made code that calculate fibonaci number (n) but how i can determine the largest fibonaci number [CODE] import java .util.Scanner; public class Fibo { public static long fib(int n) { if (n <= 1) return n; else return fib(n-1) + fib(n-2); } public static void main(String[] args) { Scanner … | |
hey there, I am trying to test strings using regex to make sure that the string may represent a monomial. that is, it must be 123123213x^213123. I am having difficulties to find any helpful information on how to test for ^. I am trying this: [+|-][0-9]*[.][0-9]*[x\^]? but I get a … | |
Hi, been reading these forums for a while because I find I learn a lot without actually having to spend time coding my own projects, but here's my first question. I am looking to develop a very simple program that can display all movie files (.avi at least to begin … |
The End.