36,051 Topics

Member Avatar for
Member Avatar for adams161

Hi, i've started making a simple breakout game with java swing. This is just for fun and to learn more about java and swing. I got a frame and a panel and a mouse listener. I draw a paddle on the screen and it moves as the mouse moves. I …

Member Avatar for adams161
0
105
Member Avatar for ibanez270dx

Hey guys, I've very new to JSP, Java, and Netbeans and I'm having an issue... So I've got an ArrayList of User objects and I'm trying to iterate over the list in a JSP page to display the info. I've included the JSTL 1.1 jstl and standard libraries. Here is …

Member Avatar for ibanez270dx
0
5K
Member Avatar for tabooxchanz

Fellow Java Coders, I recently got a project to do for my coursework in university which requires that me and my group members simulate a file manager similar to windows explorer but I guess not as complex. Here is a synopsis of what is required: The members of this group …

0
63
Member Avatar for doobiez

[quote] I'm having a problem with constructor. I get an error an error "invalid method declaration; return type required" on line 75 ..here is line 75 TypeOfStudent(int minAge, int maxAge, String name) ..and I've posted my whole code below[/quote] [CODE]import java.util.*; public class Student { private String name; private int …

Member Avatar for masijade
0
151
Member Avatar for Stefano Mtangoo

Hi, I have done this code to learn ArrayList. I keep getting errors. Basically I want to accumulate names in list and when user types 'n' at prompt, it prints out names. What is wrong? [CODE=java]package mtangoo; import java.util.ArrayList; import java.util.Scanner; public class MainClass { public static void main(String args[]){ …

Member Avatar for Stefano Mtangoo
-1
327
Member Avatar for anevins

Hi, i'm learning java and I don't know why I'm getting this error. New Error on line 11 - "Cannot find symbol" [code] int first, second; int first, second; double firstcube, secondcube, power = 3, num = 3, pow; Scanner scan = new Scanner(System.in); System.out.println("Enter First Number: "); first = …

Member Avatar for donaldw
0
114
Member Avatar for alsoumhi

Hi all , I am trying to map a user to a jsp page when he tries to enter to a directory of my application using URL. let say my web directory is called school and it has a directory called pages . now I need to map a user …

Member Avatar for ~s.o.s~
0
314
Member Avatar for rickprospers

JSP Newbie: I have a piece of code that works perfectly within the <% %> brackets but I need it to work within the <%! %> brackets. Here is the code: ------------------------ [code=java]com.newatlanta.cfc.CFCProxy myCFC = new com.newatlanta.cfc.CFCProxy("xmpp", request, response); String jsonMsgData = "A test message"; Object[] myArgs = {jsonMsgData}; java.util.Map …

Member Avatar for ~s.o.s~
0
92
Member Avatar for timaquerra

Hello, I created a web service to access oracle database. This is my code: [CODE] package mypack; import java.util.List; import javax.jws.WebService; import javax.jws.WebMethod; import javax.jws.WebParam; import java.sql.*; import java.util.ArrayList; @WebService() public class AutoRepairWS { @WebMethod public List getCustomerId(@WebParam(name = "Cust_Id") String Cust_Id){ String user = "****"; String password = "****"; …

Member Avatar for ~s.o.s~
0
199
Member Avatar for atuleshchand

How to upload an XML file through JSP web interface and transform that XML using XSLT and return the HTML file for download.

Member Avatar for ejosiah
0
59
Member Avatar for jeby

after deleting 2 ,55 and 21 ..am getting only in in-order how do i make other 2 oders package com.eyc.roughworks.binarysearchtree; import java.lang.*; import java.io.*; public class pBSTRemoveNode { public pBSTRemoveNode left, right; public Comparable data; public static pBSTRemoveNode tree_AddNumber(pBSTRemoveNode r, Comparable n) { if (r == null) { r = …

Member Avatar for jeby
0
105
Member Avatar for 9107you

i just started the course but teacher gave me this amazingly hard question for to start with he said it's some sort of challenge question im not just asking you for the answer but i think i need LOTS of // The "Taxesforresidents" class. public class Taxesforresidents // The "Taxesforresidents" …

Member Avatar for javaAddict
0
120
Member Avatar for dorotalp91

a do-while loop!!! sorry [CODE] import java.io.*; import java.util.*; public class guessing { public static void main (String args[]) { int answer = 22; System.out.print("Enter your guess, if you are correct you will be a winner "); Scanner guessReader = new Scanner(System.in); int Input = guessReader.nextInt(); { if (Input< 1 …

Member Avatar for donaldw
0
109
Member Avatar for StarZ

I'm suppose to do this using sorting algorithm..so it asks to creat a friends database application that maintains a file of friend objects that contain names, telephone numberrs, and email adresses..etc. The friends application should load friend records from a file and then allow the user to add new friends, …

Member Avatar for javaAddict
0
1K
Member Avatar for musaka87

Hi all, I have the following requirement. I need to read html blob from database and include it in JSP using <jsp:include>. Can you tell me how to do that and is it at all possible? If not what could be the right way to archieve the same result? Best …

0
57
Member Avatar for leoeroy

I'm trying to make a program that will compare the results in calculating the Cosine with powerseries method and Math.cos method. This is what i have. [CODE]import java.util.*; class Cosine{ public static void main(String[] args){ int degrees = 0; Scanner myScanner = new Scanner(System.in); while(true){ System.out.println("Enter some integer value of …

Member Avatar for leoeroy
0
2K
Member Avatar for vandhana v

hi frenz! can anyone plz help me out?! how to implement image manipulation tools of photoshop in java?! how i must start plz help!!??

Member Avatar for masijade
-1
32
Member Avatar for girl.java

hi how are u all this is my program [CODE]import javax.swing.*; public class Qustion2 { public static void main (String args[]){ double x =2/3; double y = (3*x*x)-(8*x)+4; JOptionPane.showMessageDialog(null,"At x= " + x +" the value is " + y); } }[/CODE] Mathematically when i substitute x =2/3 i get …

Member Avatar for donaldw
0
120
Member Avatar for Stefano Mtangoo

I'm new to Java, but will eventually want to use GUI for my Desktop applications. So as usual in any language, GUI toolkits are "debatable". In Python (My current "mother toungue") We have PyQT vs PyGTK vs wxPython and it is a good debate. I would like to hear your …

Member Avatar for Stefano Mtangoo
1
180
Member Avatar for Clawsy

Please someone help me... why image panel not showing that image in the frame: [code] //image panel class import java.awt.*; import java.awt.image.BufferedImage; import javax.swing.*; public class ImagePanel extends JPanel { private BufferedImage img; public ImagePanel(BufferedImage img) { this.img = img; Dimension size = new Dimension(500,500); setPreferredSize(size); setMinimumSize(size); setMaximumSize(size); setSize(size); setLayout(null); …

Member Avatar for Clawsy
0
205
Member Avatar for Ambislm

hi all, this s my first thread... Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 3 at calculator1$nextListener.mouseClicked(calculator1.java:1048) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212) at java.awt.Component.processMouseEvent(Component.java:5520) at javax.swing.JComponent.processMouseEvent(JComponent.java:3135) at java.awt.Component.processEvent(Component.java:5282) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3984) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3819) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3901) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1791) at java.awt.Component.dispatchEvent(Component.java:3819) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at …

Member Avatar for masijade
0
98
Member Avatar for Camzie

Hi there Iam busy creating an .ini file for an application, but it is throwing a null pointer exception the whole time and can't seem to figure out what the problem is. Why would it throw such an error and what does it mean? Could you please help me? Will …

Member Avatar for JamesCherrill
0
152
Member Avatar for sufi8

Hi i came across a problem with for my GUI project. for my class project i am designing an appointment calendar. for the layout i am using absolute positioning. so when i run my login class, some times the frame pops-up to a weird default Java frame (not re sizable) …

Member Avatar for sciwizeh
0
77
Member Avatar for lacompsr

The board game scrabble works by assigning points to wooden tiles arranged in cells on a board. It's described here:[url]http://en.wikipedia.org/wiki/Scrabble[/url]. We'll simplify this considerably, and consider the following question. We begin with the letter-scoring scheme from Scrabble: a = 1, b = 3, c = 3, d = 2, ..., …

Member Avatar for lacompsr
0
618
Member Avatar for sheehab

Hello... I try to do like this.. But I still ther are some errors...... I don't know how I solve them Could healp me.. please This is my code [CODE] import javax.swing.JApplet; import java.awt.Color; import java.awt.Graphics; import java.io.IOException; import java.io.*; import java.util.Scanner; import java.awt.*; import java.io.FileNotFoundException; public class colok__ extends …

Member Avatar for javaAddict
0
162
Member Avatar for justM

Hi I am trying to tokenize a string from a file. The file contains two lines that have different info. I need to tokenize the lines separately and compare the results of each line. Now, I think my problem is identifying the separate lines to perform operations separately [CODE] /* …

Member Avatar for justM
0
99
Member Avatar for abhishek.tyagi1

hi expert! i am new to jsp. i m using a html form to get user input. i want to collect all the information given by the user, using a javabean class with it's get and set property. and again i wat to display it to the user. i am …

Member Avatar for GHANSHYAM176
0
257
Member Avatar for mahesh.gothi

Hi I have a 32-bit java dll which i need to call from a asp.net application on a 64-bit machine. Please let me know if have any solution. Thanks

Member Avatar for kvprajapati
0
73
Member Avatar for btreksql

Hi, I need help, I am trying to connect from remote windows xp computer B to ms sqlserver2005 express edition in another windows xp computer A and got this error: java.lang.classnotfoundexception com.microsoft.sqlserver.jdbc.sqlserverdriver My software can connect locally to the sqlserver 2005 though in the local computer A, however when i …

Member Avatar for btreksql
0
305
Member Avatar for _dragonwolf_

I have file with a list of names in it and next to the names is a series of digits. The digits represent its level of popularity per every 10 years. The program I have asks the user to input the file path, then it asks for the user to …

Member Avatar for kvprajapati
0
163
Member Avatar for MSoul

Hello, I am currently making a game in my Java programming course My game is similar to Guitar Hero where the sprites will come down 4 different lines. What I am trying to do is make them come down those lines at random So far, I have made them come …

0
45
Member Avatar for dorotalp91

This program is supposed to ask the user to input a number and the print will read out the factorial. This code is wrong how do I fix it? Maybe not add much just jumbled up variables? Help! This was given to me created in BLUE J software i know …

Member Avatar for dorotalp91
0
163
Member Avatar for leoeroy

I need help with my java program. This program will generate Prime numbers. Class testerPrime will invoke Class Prime. Everything is working but i need my output to print in 10 columns then go to the next line. Here's my code Class Prime [CODE] class Prime { int number; int …

Member Avatar for leoeroy
0
141
Member Avatar for smachee

Hi. I am new to Java and am trying to figure out a homework problem. It is a password verifier with the following criteria: [LIST] [*]at least 6 characters long [*]conatin at least one uppercase and one lowercase letter [*]should have at least one digit [/LIST] This is what I …

Member Avatar for smachee
2
3K
Member Avatar for theCommander

I need to create java interface that prompts users to imput their username and password to access a component database using access or text file. then i need tohave search fields and buy field and then a contact us.....aahhh im trying but im reqal frustrated aaaaaa

Member Avatar for theCommander
0
168
Member Avatar for kenji

Hey, I want to know whether it is possible to send a formatted string ie. [code=java] System.out.printf("%2d%6d%23f...",a,b,c); [/code] to a .txt file so that when I view the .txt it will appear properly justified with spaces and tabs. Thanks

Member Avatar for kenji
0
96
Member Avatar for jko2326

I'm trying to create an array of two radio buttons. but with the code i have right now it just wont show up on my jframe. Can anyone tell me what I might be doing wrong? Help please.. Here is a snippet of my code .....I'm only working on the …

Member Avatar for Ezzaral
0
80
Member Avatar for c16

Hi there How do I write a simple value like 1(5v) to the DB9 port and how do I monitor the DB9 port for state changes on it? Here is the scenario : I made a circuit with a 16f627 processor that is connected to the PC via DB9 port. …

Member Avatar for rdblaha1
0
122
Member Avatar for lookof2day

I've been trying to get a list of values from database using hibernate. I'm using MS SQL Server XE 2005 and using Hibernate 3.2.2 to fetch DB rows. I've tried JDBC drivers provided by Microsoft as well as jTDS but all I get is an empty list. Here is my …

Member Avatar for lookof2day
0
827
Member Avatar for Alpdog14

I was wondering if someone can help me, I have this snippet of code that I know is giving me an issue but cannot figure why: [CODE]public D put (K key, D data){ DataTreeNode<K,D> dtn = insert(key); if(key.equals(dtn.key())) [B]return dtn.data();[/B] else return null; }[/CODE] I know I want the [B]return …

0
66
Member Avatar for rukshilag

I would like to know a list of systems (standalone) that can be made using JAVA. For example payroll system, billing system etc. Please state some simple systems that requires basics of OOP and few swing codes. Thank YOU :)

Member Avatar for peter_budo
0
103
Member Avatar for arifihsan

how to write a program in java for regular expression as • [0 − 9]*(a|b)+[x − z]?b • a+(a|b)*c(c?b|ca+)* please help me in coding ,i will waiting thanks

Member Avatar for Ezzaral
0
27
Member Avatar for SORelena

I want creat thread but I dont know...[CODE]import java.util.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; //------------------------------------------------------------------------------------------------ public class MyApp extends JFrame { // Data static boolean stopped = true; // Is the counting stopped? (True or False) --> shared variable static JTextField number; //------------------------------------------------------------------------------------------------ // Constructor public MyApp() { // …

0
54
Member Avatar for noktasizvirgul

Hello All, I need to make parallel processing with Java. I know there are threads but i need to examine a distributed-like system. I will implement the MST algorithim and with a distributed syncronizer I will merge those sepereted nodes with rounds to find best and minimum spanning tree. This …

Member Avatar for noktasizvirgul
0
579
Member Avatar for nitrogen33
Member Avatar for eechan03

[code] import javax.swing.JOptionPane; import java.text.*; public class casestudy { public static void main(String[] args) { JOptionPane.showInputDialog(null, "Program Application", "Choose a Program", JOptionPane.QUESTION_MESSAGE, null, new Object[] { "Bubble Sorting","Balloon Sorting", "Insertion","Exit" },"casestudy"); switch(casestudy) {case 1: {String stno,ndno,rdno,thno,fthno,sthno,vthno,ethno,nthno,tthno; stno = JOptionPane.showInputDialog(null, "Input 1st number:"); ndno = JOptionPane.showInputDialog(null, "Input 2nd number:"); rdno = …

Member Avatar for javaAddict
0
98
Member Avatar for galaxygal

[code=php] exec('java -version', $javaver); print_r($javaver); echo "<br />"; exec('java -jar start.jar', $output); print_r($output); echo "<br />"; exec('java -jar post.jar /home/content/j/a/n/jandtesting/html/solr/example/exampledocs/solr.xml /home/content/j/a/n/jandtesting/html/solr/example/exampledocs/monitor.xml', $output2); print_r($output2); [/code] I've never attempted anything with java before. I'm trying to get started on the solr tutorial -- a java based search engine based on Lucene. I …

Member Avatar for galaxygal
0
905
Member Avatar for jakal121

Hi, I am kind of stuck on how to display numbers between an inputted number and a specifed number, for example 10 and 5, how would I go about doing this? can anyone help me please?

Member Avatar for javaAddict
0
106
Member Avatar for gabec94

Hi, I am trying to write a binary search. The main method randomly makes an array of 1 mil int's, and the binary search returns if an entered int is in the array, but I seem to be having trouble getting it to work, I've been working on it for …

Member Avatar for gabec94
0
116
Member Avatar for lightner86

Hi gud evening to all!! :) Can someone help me with regards to my exercisE? I really need to finish my exercise.. The problem is this.. I am going to determine how many times does the letter occurs in a sentence including spaces and periods... For example: Sentence: We are …

Member Avatar for javaAddict
0
76

The End.