36,051 Topics

Member Avatar for
Member Avatar for Preethi Siva

Hi, I'm having a jsp where I'm comparing two customer beans and display diffs in red color and similarities in green. I'm trying to achieve it like this: ------------------------------------ [code]<% color = "green"; %> <tr> [COLOR="Red"]<logic:notEqual[/COLOR] name="customer1Customer" property="status" [COLOR="Red"]value="<bean:write name='customer2Customer' property='status' />"[/COLOR]> <% color = "red"; %> [COLOR="Red"]</logic:notEqual>[/COLOR] <td height="22" …

0
43
Member Avatar for koti86

I unable to find java softwares in net can you tell me sites downloading softwares like flash slide show maker, video editor, video converter for java in linux.

Member Avatar for yasuodancez
0
113
Member Avatar for NewOrder

[CODE]import java.io.*; public class Test { public static void main(String[] arg){ Console console=System.console(); String chessPiece=""; int rowEnd=0; char columnEnd = ' '; System.out.println("what piece do you want to move?"); chessPiece=console.readLine(); System.out.println("where do you want to move it to?(type column letter)"); String input=console.readLine(); columnEnd=input.charAt(0); System.out.println("where do you want to move it …

Member Avatar for JamesCherrill
0
201
Member Avatar for himmat.m4

Please tell me, how to remove value from input box at the click event in jsp. suppose input box contain A,B,C values and whenever user click button then B should have to removed. Thank's in advance.

Member Avatar for javaAddict
0
76
Member Avatar for TheSecOrg

Hi everyone, How do I create a timer in Java? It's for a quiz I'm making and I want a time limit for each question.

Member Avatar for coil
0
117
Member Avatar for TheSecOrg

[CODE] import java.util.Scanner; class apples { public static void main(String args[]){ System.out.print("Hello, today I'm going to give you a quiz. \nWhat's your name?\n"); Scanner name = new Scanner(System.in); System.out.print(name.nextLine()); System.out.print(" Is a nice name.\nToday I am going to test your knowledge.\nLet's begin!\n"); int score = 0; System.out.print("Who is Bill Gates?\n1. …

Member Avatar for TheSecOrg
0
200
Member Avatar for ChPravin

Hello, I know this question might sound stupid! I am using recursion inside a loop. I want to stop the loop as soon as the method is called recursively and resume it again when the call returns. I am not able to do so. Do I need to lock the …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for extemer

here is my code [code]import javax.swing.*; import java.text.DecimalFormat; class method { private static void start() { JOptionPane.showMessageDialog(null," Area of a Circle"); String n = JOptionPane.showInputDialog(null,"Enter a Number"); int num = Integer.parseInt(n); DecimalFormat twoDigit= new DecimalFormat("0.00"); double form1 = 3.14 * (num*2); JOptionPane.showMessageDialog(null,"… is "+twoDigit.format(form1)); } public static void main(String[] args) …

Member Avatar for coil
0
103
Member Avatar for alex1986

Hi, My java is really bad and I haven't had to use it in a few years but I want to make it better so I've decided to try building it up slowly but at the moment I'm a little stuck and was wondering if anyone could help point me …

Member Avatar for alex1986
0
181
Member Avatar for xterradaniel

Hello everyone, I am having trouble finishing my program. I am having the most trouble with the method, as described in my book, parseInt(char[]). I can't figure out what to do, I don't know how to properly write the method for this. I will include the entire program description for …

Member Avatar for xterradaniel
0
7K
Member Avatar for shivaniaroraji

what is the difference between instance variable and methods and their counterparts,clas variable and methods? i understood that instance is other name for object but what i have undersood till know is that method is somewhat like function (but i could not understand the explaination given for this question in …

Member Avatar for shivaniaroraji
0
210
Member Avatar for xterradaniel

Once again I need help with my Java program. I am running out of time to complete this program and I accidently deleted what work I had done. I am going to try to edit this post with what I have tomorrow but until then I was hoping someone could …

Member Avatar for xterradaniel
0
1K
Member Avatar for NSBailey

I am getting the following error message and do not know what it means. error: Class names, 'DemoVariables' , are only accepted if annotation processing is explicitly requested.

Member Avatar for extemer
0
112
Member Avatar for ozlem.a17

Hello, so i have a RectangularRoom, AbstractRoom (which is an abstract class) and Room (which is an interface). AbstractRoom and RectangularRoom both implement Room. Within my HomeCADengine (which is where my addRoom/removeRoom/etc. methods are kept). Now, my addRoom method seems to be a problem. I am trying to add a …

Member Avatar for JamesCherrill
0
116
Member Avatar for kimiko

Just started learning java and i'm having a little trouble with my compiling im supposed to give a screen shots of my outputs if it works but vista is blocking it (asks for permission and then just hangs) ive included the questions just in case its being bleh but it …

Member Avatar for jon.kiparsky
0
248
Member Avatar for dpirtle83

I have been trying to compile a program for school using textpad, but i am unable to find the sdk tool that is supposed to be in the tools window.i have installed the java 6 jdk/jre, then text pad ( multiple times and ended up with the same results. when …

Member Avatar for NormR1
0
158
Member Avatar for Iamthecheese

Hello, I'm working on an assignment due next week and I'm having quite a bit of trouble. The program is to ask the user for input of a double until they desire to stop. That part, I imagine will be in the Test file. The master file is to store …

Member Avatar for NormR1
0
201
Member Avatar for MonkeyCode

Using the following: [CODE] protected void testDriver ( ) { String drivers = "nada"; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch ( java.lang.ClassNotFoundException e ) { System.out.println("MySQL JDBC Driver not found ... "); } catch (IllegalAccessException ex) { System.out.println("Illegal Access"); } catch (InstantiationException ex) { System.out.println("Instantiation problem"); } System.out.println("Midway drivers are " …

Member Avatar for peter_budo
0
850
Member Avatar for mompoleon

I have been using textpad and Java for 3 months without trouble. We just got a new computer 64 bit Windows 7. I have downloaded Java and Textpad on the new computer but when I go to external tools to compile, the compile and run tools are missing. I have …

Member Avatar for dpirtle83
0
1K
Member Avatar for ivan3510

Hi! Sorry for my bad english. How is made that toolbar on this site always stays on the botom of the page. (So, when we log in, on this site will appears toolbar. When we scroll down, this toolbar stay, it doesn't move anywhere, it stay on the bottom.)

Member Avatar for ivan3510
0
109
Member Avatar for LianaN

Hi! I need to make multi-user software that will allow accessing a DB from different PCs and working with this DB. Could someone pliz just generally (conceptually, but in step-wise manner) describe me how this task can be implemented? Maybe, there are some good tutorials or free examples on this …

Member Avatar for LianaN
0
291
Member Avatar for NewOrder

i want to import an array, but i cant.. i have my chess class.. and one method that tries to check whether there is a check. basically like this.. [CODE] if(pieces[columnStartN][rowStartN].isMoveValid(columnStartN,rowStartN,columnEndN,rowEnd) && pieceDevour){ pieces[columnStartN][rowStartN]=null; pieces[columnStartN][rowStartN]=pieces[columnEndN][rowEnd]; } rowStartN=rowEnd; columnStart=columnEnd; int kingRow=0; int kingColumn=0; chessPiece="BKing"; int c=0; int pieceColumn=0; int pieceRow=0; for(int …

Member Avatar for NormR1
0
200
Member Avatar for Pushpasheela

I want to fetch data from msaccess database using like. but my query not run. Here is my code.[CODE]String pin=cmblocation.getSelectedItem().toString(); rs2=st2.executeQuery("Select * from pin_numbers where pin_number like 'pin&????'");[/CODE]. But my query is not run. Please help me.

Member Avatar for peter_budo
0
234
Member Avatar for mukulnimker

pls help............ hello frnds i ma mukul i am working on a java project in netbeans i am using swing application there is a use of JTabbedPane for which i have to give the object of other class as a Parameter but when i create another class outside the previous …

Member Avatar for sidhu2204083
0
214
Member Avatar for Pushpasheela

I am new in java swing. Currently i am create one application. I am using one button name is 'Add entry'. if i click the add entry button then display one frame that contain some textfields. i am enter datas and click save then the value save in database record …

Member Avatar for JamesCherrill
0
94
Member Avatar for dina

Hi everyone, Just need abit of help. im studying selection sorting at the mo.....ive wrote an essay wot it and how it works but im tryin to an example in java and im having problems with that.....im not a very good java user.....ive only just started. i just wanted to …

Member Avatar for javaAddict
0
486
Member Avatar for LianaN

Hi all! Could someone pliz explain me how to delete a component (in my case -> JLabel that is placed on JLayeredPane), when it is double-clicked? So, as far as I understand, I must first just detect a componment that is double-clicked and then delete it. Although an idea is …

Member Avatar for LianaN
0
204
Member Avatar for boyz

Suppose we have function foo() in Servlet A. From Servlet B how can we call this foo() function of servlet A? both servlet are from same application and in same context....

Member Avatar for himanijain
0
103
Member Avatar for dan94

Hi, I am creating a java program using a JFrame as the main window. I have components inside the JFrame, and these components have tooltips enabled. When I show a tooltip, if the tooltip happens to overlap the JFrame boundaries, the tooltip shows no text, and only a blank rectangle. …

0
24
Member Avatar for ss_hat

I'm running into a roadblock on my program and the deadline is Tuesday(9/14). I'm at work all day and I'm hoping the interwebs can help me while I'm away (i can check @ lunch). I'm very new to Java and I'm still trying to digest the terminology so any clear …

Member Avatar for James cuck
0
226
Member Avatar for kch1973

I am trying to get an array sorted but I can't figure out how to correctly write the "if" statement in the sort method. I have been given the task of sorting the arrays by product name. I am not done with the program, but what I do have so …

Member Avatar for tong1
0
76
Member Avatar for brettbed

I think I'm having trouble with using parameters correctly in the JUnit assert in my Test method. My assertion fails even though I'm pretty sure my logic checks out. How do I construct the correct test with assert? Any pointers appreciated :) [CODE]public String season(int month, boolean inNorthernHemisphere) { // …

Member Avatar for jon.kiparsky
0
324
Member Avatar for fuser

Hey folks, recently I wrote a small application in java where it generates ip addresses in a 192.168.x.x block, and then proceeds to ping them to see if the address is available or not. The main issue with it right now is that it's extremely slow when I tested it …

Member Avatar for fuser
0
133
Member Avatar for kandyhyatt

Help: This is my first time on this site , and I have this assignment i been working on and i'm lost someone please help Here is the problem : 1.) A government research lab has concluded that certain chemicals commonly used in foods will cause death in laboratory mice. …

Member Avatar for Katana24
0
195
Member Avatar for amrita111

I am planning to develop a graphical project for my final year..Which tech should i choose? Microsoft Silverlight,Macromedia flash,Macromedia Shockwave,ajax etc, which of these is simple,scalable and platform independent?which combination of frontend and backend will be the best?

Member Avatar for Phaelax
0
101
Member Avatar for newtoajax

HI I am trying to pass a value from dropdown list on onchange event fo the dropdown in a jsp page through AJAX to servlet. The servlet then returns the value back to the jsp page and displays it in dropdown list. the problem I am facing is that the …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for Stefano Mtangoo

Hi, I have a page where I include another page passed via url Url is something like [B][url]http://www.daniweb.com/newthread.jsp?page=24[/url][/B] and I get the variable as [CODE=JAVA]String thePage = request.getParameter("page") ;[/CODE] Now I want to include it in my page and the code below doesn't work. I have googled and I cannot …

Member Avatar for Stefano Mtangoo
0
198
Member Avatar for TheComputerGuy

The code will work if compiled in terminal. It does not work if I use Eclipse, it simply gives me an Array Out of bounds. It mentions the ARGS[0] as the out of bounds part. Any suggestions? [CODE]/* * * Test Case 1: 1. James 2. David 3. Melanie 4. …

Member Avatar for NormR1
0
108
Member Avatar for kvij

Hi Experts, I am unable to login into oc4j after giving the correct username and password. i am able to get the oc4j enterprise manager and able to enter the username and password. but when i click submit button, it is not allowed me to proceed. Pls give me the …

Member Avatar for peter_budo
0
258
Member Avatar for satish2

hi everyone I want to develop a web browser.....can anyone suggest me how to develop it in java ...

Member Avatar for daudiam
0
82
Member Avatar for daudiam

I was reading an SCJP book by Khalid Mughal and I came across a statement [QUOTE]Enum constants are static members[/QUOTE] and another [QUOTE]Enum constant is an instance of its enum type[/QUOTE]. I am unable to reconcile the 2 statements. Are the constants static members or are they instances ? (Instances …

Member Avatar for daudiam
0
364
Member Avatar for daudiam

Its said that enums can be nested as top-level type declaration. Does it mean that it can be declared as a data member of a class, but it cannot be declared as a data member of a nested class as the nested class id not top-level ?

Member Avatar for daudiam
0
80
Member Avatar for gunjannigam

I am writing some data to a file using FileWriter and BufferedWriter. I want that while writing in the file if somebody else wants to open the file in MS Excel, it should open only in read only mode Here is a snippet of my FileWriter and BufferedWriter [CODE] while(true) …

Member Avatar for masijade
0
157
Member Avatar for miraj0072004

hello friends, I have s small problem, say if I declare a variable as String name="miraj"; now i want to use the value of the variable name, that is "miraj" and create a file using that name, which means something like miraj.txt ... how do I do it? The part …

Member Avatar for miraj0072004
0
97
Member Avatar for himmat.m4

Plz tell me, how to display number of value get form javascript function at every call on the jsp page. suppose in following code I m displaying IdNo var on jsp page in input text at call changeImage(IdNo) and here when next time call this fun then aganin overlaps value …

0
70
Member Avatar for michael.ngobeni

I have a string "Hello World" I want to change the color of [COLOR="red"]Hello[/COLOR] to red using the [B]setCMYKColorFillF[/B] function. I'm writing the string to a PDF file I know I'll use to write to the pdf: private PdfContentByte WriteTxt = null; WriteTxt.setCMYKColorFillF(float Cyan, float Magenta, float Yellow, float Black); …

Member Avatar for masijade
0
291
Member Avatar for palavi

Hi, can anybody tell me how to send mail from smtp to different email-id s like gmail,yahoo rediff from my java application. I am able to send mail from my machine within the company email-ids but not on other , if i put gmail or yahoo address im getting this …

0
71
Member Avatar for anandhikrishnan

I have a jsp file a.jsp which has b.js now i want to pass a value from a.jsp which is come from a java function like <% patientmodel.getpatient()%> I need to pass the value of this function to a function in b.js any one suggest me plz

Member Avatar for javaAddict
0
96
Member Avatar for Jawahar prabhu

when i try to compile lwuit with netbeans it shows the follwing error "Error preverifying class com.sun.lwuit.impl.midp.SVGImplementation$Handler java/lang/NoClassDefFoundError: javax/microedition/m2g/ExternalResourceHandler" please anyone help me.... thanks in advance.. Regards., jawahar prabhu

Member Avatar for peter_budo
0
102
Member Avatar for mahdi68

Hi i have probleam on run application , when i click on "Launch as emulated Java ME JAD" this message shown : [QUOTE]com.sun.kvem.midletsuite.InvalidJadException: Reason = 22 The manifest or the application descriptor MUST contain the attribute: MIDlet-1[/QUOTE] but its run true when i click on "Launch as emulated Java ME …

Member Avatar for peter_budo
0
96

The End.