36,051 Topics

Member Avatar for
Member Avatar for adabq

This is something I've been struggling with for a couple months now without having much luck. I beginning to think it's not possible but I'm hoping someone here can prove me wrong. The environment I am working with is a JSP page that interfaces with a java Bean. I want …

Member Avatar for adabq
0
463
Member Avatar for music_est_vie

Hello I am new to Java. I am building a video game for school - similar to the Sims game - and have encountered an issue. My group is creting all the algorithims for calculating health, keeping track of time, achievments, etc. My job is to create the graphical interfaace. …

Member Avatar for javaAddict
0
170
Member Avatar for aditya_22cent

I have created a text box in html and if the string entered by user is a alphabet it will not show any message ,else it should display a error message..These checking validations of textbox is done in java and called in jsp; ---------------------------------------------------------- [B]a.html [/B] [code=html]<font size="4">Enter the search …

Member Avatar for javaAddict
0
136
Member Avatar for chrisb76

I am having multible problems with my code. Here is what it is supposed to do: Write the program in Java (with a graphical user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage, the term of the mortgage, …

Member Avatar for stultuske
0
102
Member Avatar for jeetudaljit
Member Avatar for George2

Hello everyone, Are there any approaches to invoke Java libraries from C/C++? Thanks in advance, George

Member Avatar for hasrule
0
532
Member Avatar for aomran

I am getting Exception in thread "main" java.lang.nullpointerException on line 113,92,200, need help [CODE] // heap.java // demonstrates heaps // to run this program: C>java HeapApp import java.io.*; // //import java.util.Scanner; class Node { private int iData; // data item (key) // ------------------------------------------------------------ public Node(int key) // constructor { iData …

Member Avatar for aomran
0
148
Member Avatar for lumbeelock

public class TestOctagon { public static void main(String[] args) { Octagon octagon = new Octagon(1); System.out.println("1st Octagon " + octagon.toString()); System.out.println("The area is " + octagon.getArea()); System.out.println("The perimeter is " + octagon.getPerimeter()); Octagon octagon1 = new Octagon(2); System.out.println("2nd Octagon " + octagon1.toString()); System.out.println("The area is " + octagon1.getArea()); System.out.println("The perimeter …

Member Avatar for vchandra
0
101
Member Avatar for MoooCow

I have a linklist of nodes which have a link list of edges. This method is trying to get the number of edges so the nodes will know how many edges it has. However, this doesn't really work and I am wondering how to fix it. thank you in advance. …

0
38
Member Avatar for Gage84

Hi, I'm new to this forum I'm trying to allow my menu items to work by allowing a user to press it and then display a message such as 'door locks' etc and keep a progress that the door is locked or unlocked... pic below highlighted in red however with …

Member Avatar for Ezzaral
0
108
Member Avatar for RossThels

Hello, I have the current problem. As it stands im working on an ImageViewer project. I'm having trouble determining the mouse location for what I think are the following reasons. I currently have the frame, and within that frame is a JTabbedPane. Each tab is a new object, which creates …

Member Avatar for Ezzaral
0
121
Member Avatar for aodpreacher

I am trying to make a program that finds the max and min of more than 2 inputs and i am trying to use the Math.Min and Math.Max method but i cant seem to get them too work since they only accept 2 parameters. this is what i tried to …

Member Avatar for DeeZi
0
10K
Member Avatar for pepperleaf

I use this method to check the values from the scanner. My do-while loop prints an error message and then resets to the beginning of the scanner after an invalid value is detected. But it also resets when I've used good values, without the error message. I've been googling up …

Member Avatar for pepperleaf
0
152
Member Avatar for Awais Ahmad

I am making a simple Notepad Application in Java.I want to find strings in JEditorPane.I have no idea of how to find and highlite it.

Member Avatar for Ezzaral
0
51
Member Avatar for moonis.ahmed

Hi, how can I call another JSP without transferring control to that. The response.sendRedirect is transferring control to the next jsp page. I still have some code after the response line which needs to be executed but it doesnt gets executed. Any suggestions? Thanks

Member Avatar for filestofiles
0
99
Member Avatar for MiamiPPCPro

I apologize if I didn't post this in the right forum, but I did a search on this site and couldn't find anything on this topic... So, here is the deal...I am not at all a programmer, and have no knowledge of it whatsoever...As such, I am working on a …

Member Avatar for music_est_vie
0
178
Member Avatar for pirateninja1111

I'm wondering how to start a Boolean array at 1 instead of 0. so far the only thing i can think of is: [CODE] Boolean [] x = new Boolean[12]+ 1; or Boolean [] x= new Boolean[12 + 1]; [/CODE] and the top one does not compile while the bottom …

Member Avatar for masijade
0
137
Member Avatar for dolorous86

hello guys, i have several problem with exception such as IOException , NullPointerException,and ArrayIndexOutOfBoundsException. i do BLUETOOTH PUBLIC AND PRIVATE CHATROOM. so, while im running the emulator in netbeans, the problem with exception appear in output pane: i already choose PUBLIC chat and do chatting without any problem, let say …

Member Avatar for peter_budo
0
131
Member Avatar for albertkao

My controller.java encounter an input string: "undefined". Please help. [CODE]public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { int rowsPerPage = 20; String rowsPerPageStr = request.getParameter("rowsPerPage"); logger.info("rowsPerPageStr " + rowsPerPageStr); if (rowsPerPageStr != null) { rowsPerPage = Integer.parseInt(rowsPerPageStr); }[/CODE] My jsp page use javascript as follows: [CODE]window.location = "hwdisplay?rowsPerPage=" + …

Member Avatar for javaAddict
0
425
Member Avatar for happyhound

Hello, I have been programming with the same JDK SE since last semester and now all of a sudden I am getting an exception in "main" with just a print statement. I uninstalled the old then reinstalled a newer version of the JDK SE from sun but I am still …

Member Avatar for peter_budo
0
138
Member Avatar for Nickair

Hi, I am currently learning the Java programming language and have downloaded the latest Eclipse Platform to program with and encountered an interesting error while trying to import a folder with some of my previous work. the importing client in eclipse encountered some error about a buffer overload which i …

0
91
Member Avatar for Addi15

Hey Guys I was wondering if anyone could help me. I have to put pictures such as JPEG's into a swing program as part of an assignment. I've looked in textbooks and online but anything I find doesn't work. Can this be done cause I'm completely lost with it? Please …

Member Avatar for Ezzaral
0
62
Member Avatar for Amurka

Annual Interest Rate [COLOR="Red"] Monthly Payment[/COLOR] 11.00 [COLOR="Red"]952.32[/COLOR] 11.25 [COLOR="Red"] 971.26[/COLOR] 11.50 [COLOR="Red"]990.29[/COLOR] 11.75 [COLOR="Red"]1009.41[/COLOR] 12.00 [COLOR="Red"]1028.61[/COLOR] I've done the hard part and completed the project, but I can't figure out how to get my program to output in two columns like above. Since this site doesn't take spacing, black …

Member Avatar for alisneaky
0
2K
Member Avatar for bletchley

Any good web resources out there for picking up C++ after already knowing Java? It's kind of a yawn to have to go back over concepts that are already familiar - functions, classes, polymorphism, recursion, etc. Really just looking for syntactic differences. Would be great to find some solid tutorials …

Member Avatar for Ancient Dragon
0
100
Member Avatar for gunjannigam

I want to Edit the Title of Save Dialog Box in JFileChooser from Save to Something Else. How is it possible?

Member Avatar for Freaky_Chris
0
84
Member Avatar for bletchley

I'm pretty proficient with Java but am not sure what's going on with pointers, classes, or imports/includes in C++. I originally had a size() function but I was getting error about it conflicting with my 'int size;' variable. Can functions not share the same name as variables? I renamed it …

Member Avatar for jonsca
0
127
Member Avatar for Illidanek

Something that i'll probly need to know in the future or even soon. What is the proper term of calling this | thing but blinking, when you type and it shows where you are typing. And is there any java API or any java commands linked to this? thx

Member Avatar for Illidanek
0
101
Member Avatar for drogba111

Hi there , basically i need to find connected components in graph using deep first search. i have already implemented the DFS method but unable to think how am i supposed to print out which is the connected components. is there any hint in implementing it using dfs?tips or pseudo …

0
41
Member Avatar for gokul

Hi, I am developing small chatting application... when i try to run the application, it throws the IO Exception while creating sockets.. How to resolve resolve the this one..? please help me.. i attached the code for your view...

Member Avatar for debjit.samsung
0
196
Member Avatar for john249D

I need to write an inheritance hierarchy for classes quadrilateral, trapezoid, parallelogram, rectangle and square. Quadrilateral bieng the superclass of the heirarchy. Make the hierarchy as deep as possible. Specify the instance variables and methods for each class. The private instance variable of Quadrilateral should be the x-y coordinate pairs …

Member Avatar for jwenting
-1
142
Member Avatar for KSUliz

[code=java] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; import java.text.DecimalFormat; public class Grades extends JFrame { //construct components JLabel title = new JLabel("Grades"); JTextPane textPane = new JTextPane(); int numberOfGrades = 0; double total = 0; DecimalFormat twoDigits = new DecimalFormat ("##0.00"); //initialize data in arrays int[] grades = …

Member Avatar for moutanna
0
175
Member Avatar for lumbeelock

Can someone please HELP??? [CODE] public class Person { private String name; private String address; private String phoneNumber; private String email; public Person(){ } public Person(String name, String address, String phoneNumber,String email) { this.name =name; this.address=address; this.phoneNumber=phoneNumber; this.email=email; } public String toString() { return "Person "+ this.getName(); } public String …

Member Avatar for moutanna
0
286
Member Avatar for why1991

For my program I am working with simple graphics and need to display a straight row of squares from left to right decreasing in size. I also have to program this recursively so that it makes the squares following the first one by itself. My problem right now is that …

Member Avatar for darkagn
0
117
Member Avatar for ceyesuma

hello. I believe my InputStream is is null. Is there a way to get it to work? [code]InputStream is=pr.getClass().getResourceAsStream(path);[/code] [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package schoolAppView.utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; /** …

Member Avatar for BestJewSinceJC
0
173
Member Avatar for ceyesuma

hello. Could someone tell me what I need to change to get the initial contcext for my JDesktopApp? [code] public JDBCSchoolofdbDAO() { try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup( ModelUtils.getResource("JavaCompEnv")); dataSource = (DataSource) envCtx.lookup( ModelUtils.getResource("DataSource")); } catch (NamingException x) { ModelUtils.log(x); throw new InternalError(x.getMessage()); } …

Member Avatar for ceyesuma
0
200
Member Avatar for jnthn205

Can someone tell me how to print out each array and its value? we are given a random array of 1000 doubles. If a value in the array is above or below 90% the average, we are to print the "flagged" values. So far, I just have it printing one …

Member Avatar for jnthn205
0
258
Member Avatar for crackers8838

Hi, I was wondering is anyone could tell me how or give me pointers on how to convert the base of a number to another base. For example 2010 base 3 to base 4. I am stumped and I would appreciate any help I could get.

Member Avatar for javabru
0
91
Member Avatar for pradeepktg

Hi All, I have a database table "productdetails",where i have id,name,price,prodimage(blob) fields. Am displaying all the records using jsp inside a div with the help of while loop, am getting all the datas correctly except the image. Check below code and let me know how to display the image retrieved …

Member Avatar for peter_budo
0
74
Member Avatar for ardn0001

Hi, Im new in this forums looking for an answer for my problem, I find a similar post here so I decided to suscribe here because this website look very professional. I had the following code: [CODE=java]public class Gen { public static void main(String[] args){ args = new String[6]; args[0]="0101"; …

Member Avatar for ardn0001
0
188
Member Avatar for gajen007

I have confused to use Java Native Interface with dll file (by c++).. To get the squired value of a number which will be given by user... this is my class file...which also should be converted as header file for c++ file (dll file preparing...) import java.io.IOException; class First { …

Member Avatar for Freaky_Chris
0
151
Member Avatar for samrin

here is my code but i need to get output if my Sample input: 3 Sample output * *** ***** *** * will must look like this! now can anyone please help me with this .. [code=java]public class p2.java{ public static void main (String args[]){ int x; SimpleInput sInp = …

Member Avatar for javaAddict
0
171
Member Avatar for snowball14

Can anyone tell me what I am doing wrong? I can't get it to calculate the charges.

Member Avatar for stultuske
0
112
Member Avatar for java=hard

I have been scrounging about, trying to get to compile this properly, but I get a stupid error message at the end. I also do not know how to implement an accumulator into the methods, could someone at least teach me how to implement one? Into Main, or just a …

Member Avatar for stultuske
0
161
Member Avatar for knowledgelover

Hello there, we have a web application that must read a card which is plugged to the client, the reading of the card is done via a specific library, which is as a jar file, as have googled that situation , concluded that to achieve that we need to use …

0
73
Member Avatar for novellino

I am trying to make a form using html and JSP, get the data and save them in an XML file. I use also Tomcat 1.6 as server. For generating the XML I am using the XStream library. I have a Customer.java class with get and set methods for a …

Member Avatar for novellino
0
528
Member Avatar for Virux

Alright, been trying for at least an hour. I want to be able to add functions to a JPanel Example, JPanel a = new JPanel(); a.setTransparency(color, strength); or something like that. a.myFunction(parameters) Is this even possible? I am getting sick of overiding the paint method for every panel I create …

Member Avatar for Virux
0
93
Member Avatar for chern4ever

need help, this is my code! [CODE]import javax.swing.JOptionPane; public class Lab2_1 { public static void main(String[] args) { int value1=0 ,value2=0 ,operator=0; String temp4="1"; while(temp4 != "0" ){ String temp1 = JOptionPane.showInputDialog(null,"Please enter first value."); value1=Integer.parseInt(temp1); String temp2 = JOptionPane.showInputDialog(null,"Please enter operator.(+,-,*,/)"); String temp3 = JOptionPane.showInputDialog(null,"Please enter second value."); value2=Integer.parseInt(temp3); …

Member Avatar for javaAddict
0
109
Member Avatar for sawant_nitesh

content eg. 1. java.lang.String, 2. java.util.HashMap<Integer, Integer>, 3. java.util.ArrayList<Integer>, 4. java.util.HashMap<Integer, ArrayList<String>>, 5. java.util.HashMap<Integer, ArrayList<ArrayList<String>>>, I need a regex for matching method parameters in Java. I have tried with this one.. ([a-zA-Z\. ]+,)|([a-zA-Z\. ]+<[a-zA-Z\., ]+(<[a-zA-Z\., ]+>)*>[ ]*,) It is matching first 4 strings. But it is not matching 5th one, …

Member Avatar for Freaky_Chris
0
86
Member Avatar for morisboy

Hi, Is it possible to create a jar file (mobile app) from JSP files? I mean instead of using some toolkit to compile the java files and create the jar file, can I do the same using JSP files? Thanks.

Member Avatar for peter_budo
0
121
Member Avatar for jasrose

hi... Iam doin a research project in cluster based bit vector algorithm... i.e. a combination of clustering and bit vector concepts... will you help me to start the implementation...???

0
30

The End.