35,617 Topics
![]() | |
Let's claim that I have jar called j.jar in folder called: my_folder. Then in this jar I have folder called:javclass and in this folder ther is main class called: main.class. And I have a question: How html file which opens it should look like ?? | |
I'm trying to write a tic tac toe applet. Below is the code. I can't get it to line up in 3 rows of 3 and also it shows "win" as soon as 1 button is clicked. Any help would be appreciated. Thanks. import java.awt.*; import java.awt.event.*; import java.util.Random; import … | |
i'm thinking how to do this since last week. i can make a rps game in java, BUT not in OO way. just the simple ones. what i want to do is a rps game - the OO way. i planning this program to have two options, play with player … | |
Hello... again. I'm sorry about asking about this again, but I'm still stumped =S I can't find any tutorials or examples on this matter*, and I don't know what to do. I still need to find a way to get commands to paint from one JVM to another. I tried … | |
Hi, I'm starting working with the Graphics and related and strugling to understand it. I'm trying to do something as simple as drawing a String on a panel. The string changes on runtime. I post the code below. In effect, every new number is drawn on top of the old … | |
Hey guys and girls. Im working on a program at the moment, the aim of which is to determine a users age level (by year at school), and give them a set of randomly generated maths problems based on their age (eg- 1st grade only has to deal with numbers … | |
hi, i am doing a system in java for my assignment .that system is able to add ,delete,modify records. i have created sql commands for all in my programme.but i don't know how to put codings on above buttons here i attach some cods.any one please help me. this is … | |
[CODE] <%! String[] selElts=new String[100]; %> <a href="myPage.jsp" onclick="selElts = tree2.getAllChecked()">Get list of checked</a> [/CODE] the values to array "selElts" are returned from a javascript function. now, how could the print the array values in the same jsp page (or) how to retrieve from next JSP page(myPage.jsp) | |
I am a beginner in Java programming after a few lessions I was provided with this task and I have no clue how to go about it.this appears to be simple but for me is a mountain, if any one could help I will really appreciate it. Here goes the … | |
These are my three functions explaining sql functions update and delete functions .can any body help me to write the buttonactionperformedfunction? [ICODE] public boolean editBus(int busid,String name,int seats) { boolean bEdited = false; try { updatebus.clearParameters(); updatebus.setString(1, name); updatebus.setInt(2,seats); updatebus.executeUpdate(); bEdited = true; } catch(SQLException sqle) { sqle.printStackTrace(); } return … | |
i am creating my jar file jar cvf javaappl.jar javaappl jar cfm javaappl.jar manifest.txt javaappl manifest is added correctly. but when i try to run java -jar javaappl Invalid or corrupt jar is displayed. Earlier it has run, but the same thing is not running now. What is the probable … | |
I know what a Jar file is. [url]http://java.sun.com/developer/Books/javaprogramming/JAR/basics/build.html[/url] I just can't figure out how to get it to be recognized as a command. I have the same problem with appletviewer. I was told i was suppose to to set some path but i am not sure where it is. I'm … | |
I want to create a custom NumberFormat which returns empty string for negative values and the double number iteslf for +ve and zero values. Please guide me.................... | |
hi 'm aparna. Am developing a web application with j2ee and SQL server 2005 EXPRESS EDITION as the back end. When i connect it with JDBC , my connection turns out to be successful. WHen i run the application, the web page is openin, but the problem is values are … | |
Hi all, I am new to java i want to download, jdk1.5 as my guide specified ,, but i dont know the link......so please help me out........and tell me out to install it on my pc. Thanks, ishlux | |
Hi there, I am new to JSF and can someon please help me on how to extract the session value wich is the login name of the user for persistence in the backing beans.... I will be most grateful for your respons. | |
Hi All, I have create a custom tag to translate texts. I have to pass 3 parameters to this tag. As the parameter values are on static. I have to pass runtime expression as parameter values.I have tried various ways for this, but did not suceed. Please let me know … | |
any example to reset a bean to null using application scopre? | |
consider i have this bean [CODE] private string name = "fadi"; public String getname() { return (name); } public String setName(String name1) { name = name1; return (name); } [/CODE] Now I have jsp file.. [CODE] <% beanid.setname("lol"); beanid.getname(); %>[/CODE] Now with this code name was fadi, i changed it … | |
//styleDetail.jsp [ICODE] <html> <jsp:useBean id="productView" scope="request" class="com.view.ProductView" /> .... <% List result = productView.getProductList(); Iterator it = result.iterator(); while(it.hasNext()){ %> <tr> <td><input type="checkbox" name="id"></td> <% List temp = (List) it.next(); Iterator it1 = temp.iterator(); while(it1.hasNext()) { Object obj = it1.next(); request.getSession().setAttribute("value",obj); %> <td><a href="ProductController?selectedValue=link"> <% out.print(obj); %> </a></td><% } %> … | |
Hey folks, Now java may be the wrong language for this but I would like to get a motion sensor program going (if possible). Basically I already have hooked my webcam up, and can import it to a window via java. I am trying to find a way to basically … | |
i just dont know how to convert this. i have three integers for month, date and year. year is a two digit input. i want to convert these three into one variable type long.. but i dont know how to do it. i tried adding the three integers, but i … | |
Hi am new to Java and am developing a multi agent application using Jade. I have coded 1 agent using Java and the other agent using vc++. My problem is communication between java and vc++. 1) I need to run the vc++ program within the java program for which i … | |
//track the number of times each face of the dice is rolled if(Integer.parseInt(d1.toString()) == 1) one++; if(Integer.parseInt(d2.toString()) == 1) one++; if(Integer.parseInt(d1.toString()) == 2) two++; if(Integer.parseInt(d2.toString()) == 2) two++; if(Integer.parseInt(d1.toString()) == 3) three++; if(Integer.parseInt(d2.toString()) == 3) three++; if(Integer.parseInt(d1.toString()) == 4) four++; if(Integer.parseInt(d2.toString()) == 4) four++; if(Integer.parseInt(d1.toString()) == 5) five++; if(Integer.parseInt(d2.toString()) == … | |
[code=Java]public void showPlayer(int cell,int playerID){ int row = this.getRow(cell); int col = this.getCol(cell); cellLabel[row, col].TextAlign = ContentAlignment.MiddleCenter; cellLabel[row, col].BackColor = Color.Purple; cellLabel[row, col].ForeColor = Color.Gold; cellLabel[row, col].Text = "P"+Convert.ToString(playerID); }[/code] Here is a part of my code. How can I add a jpeg image to the above cell, called cellLabel[] … | |
All Java applications must contain at least one method. The name of this method is either main() or Main() true or false?? | |
hi friends... I have Written some codes for adding and retrieving data from RMS: [CODE] public void commandAction(Command command, Displayable displayable) { if(command==exit) { destroyApp(true); notifyDestroyed(); } else if(command==start) { try { recordstore=RecordStore.openRecordStore("My RecordStore",true); } catch(Exception error) { alert=new Alert("Error Creating",error.toString(),null,AlertType.WARNING); alert.setTimeout(Alert.FOREVER); display.setCurrent(alert); } try { String outPutData[]={"Mary","Bob","Adam"}; for(int x=0;x<3;x++) … | |
Hi,I am in TE comp Engg.We have got a project in ADBMS subject using Applet or Swing.we are using Jpanel.We had made admission form in which user will fill the form and data will be stored in Database.So to make the form look good we want to add image at … | |
I am trying to say " if a number is divided by 2 and the modulus is equal to 1" if(count/2% == 1) or if(%(count/2) == 1) It's not working. What am I doing wrong? Would really appreciate help. Thanks. | |
I can't seem to control the size of the applet when it appears in the appletviewer and i assume that will be how it looks on the web. Right now, on the web, my applet is too big: [url]http://blogfriendlyzone.webs.com/WheelOfFortune/WheelOfFortune.html[/url] When i run it as application, it obeys setSize to make … |
The End.