35,618 Topics
![]() | |
Assuming a one dimensional integer array a[] has been declared and created with 100 elements: for (int i = 0; i<=a.length; i++); a[i] = 5; Assuming int b [] [] = new int [3] [3]; b[1, 1] = 5; Strings students[] = {Pat, Tom, Mary, Anne}; | |
Hi! i creating java apps to edit windows registry .... it is fine in Xp but in Vista its need admin privileges.. how do get it programmatic-ally... in .net app.manifest is there..but in java anything is for admin privil.. | |
Hi all is it possible to delete the last line of a text file each time a method is called. I have the following method: [CODE] Writer output = null; File file = new File("playerData.xml"); try { output = new BufferedWriter(new FileWriter(file, true)); output.write("\t" + "<player>" + "\n"); output.write("\t" + … | |
input a number and convert it into binary, octal and hexadecimal using built in methods of integer class | |
Please help. i do not know how to do this as i am a java beginner. i only know to use a string and output. how do i do this with a loop? this shows to the side bit it should be in the middle.... like an upside down A … | |
I want to get data sales item, its with compare table item with table sale although item in table sale nothing, data will show according with data item i have SQL like this [code] select i.code,s.date_sale from Item i left join(select * from Sale where date_sale <='2009-01-31') s on i.code=s.code; … | |
i have written the following code and it is not executing due to the following [B]error[/B] [COLOR="Red"]dec.java:7:integer number is too large :10000000000[/COLOR] [U][B]code[/B] [/U][CODE] import java.util.*; class dec{ public static void main(String args[]){ long dig,store,use,temp,temp1,end; int count=0,count1=0,ch; use=1000000000; end=10000000000; while(use<end){ dig=use; for(int i=0;i<10;i++){ temp=dig%10; dig=dig/10; ch=(10-i)%10; store=use; for(int k=0;k<10;k++){ temp1=store%10; … | |
I'm going to put the text information to "data.bin" file in binary mode. Then i'm goint to read that information from file. I did by using "FileOutputStream", then "ObjectOutputStream" class and his "writeObject();" method, but this one just puts serialized object data to file, and as I understand - that's … | |
Hai Friends, What is Swingworker class? were we can use this class? what its advantage? can any one explain this.... | |
I am having a problem with my code which handles whether or not the client has disconnected this is the run method for each thread. The code gives me an error, something about the nested catch block not ever happening or something. I didn't understand. Thanks for any help. I … | |
to declare and populate my array i am using [CODE] //declare Image pictures[][] = new Image[16][14]; public void init(){ //populate pictures[2][0] = getImage(getCodeBase(),"twohearths.png"); pictures[3][0] = getImage(getCodeBase(),"threehearths.png"); pictures[4][0] = getImage(getCodeBase(),"fourhearths.png"); pictures[5][0] = getImage(getCodeBase(),"fivehearths.png"); pictures[6][0] = getImage(getCodeBase(),"sixhearths.png"); pictures[7][0] = getImage(getCodeBase(),"sevenhearths.png"); pictures[8][0] = getImage(getCodeBase(),"eighthearths.png"); pictures[9][0] = getImage(getCodeBase(),"ninehearths.png"); pictures[10][0] = getImage(getCodeBase(),"tenhearths.png"); pictures[11][0] = getImage(getCodeBase(),"jackhearths.png"); … | |
The name of this question jstl_var_message Hello and Thank you in advance for any assistance. [B] System info: [/B] Netbeans, JSF, glassfish [B] The Purpose of this post is: [/B] To set a variable to use to map the stylesheet.css to messages [B] The functionality of this code is: [/B] … | |
Hey techFriends, I was wondering since JSTL ( Java Standard Tag Library ) main purpose is to only make your logic more readable, what are the real benefits of using such technology in my Java server pages? From what I have seen in the Java Server Tag Library document, seems … | |
Hi. I'm working on a encryption thing. For it to run properly i need jsp to be able to handle big integer numbers (10^15 and higher). The long variable gets me to about 10^9, but that is not enough. I cant seem to find a way to force jsp to … | |
I need a method of rendering HTML in Java. I was originally planning to use [URL="http://www.genuitec.com/about/labs-webkit-for-swt/WebKit%20For%20SWT%20Developer%20Guide.html"]WebKit for SWT[/URL], but I'm having problems with it displaying images as specified in the CSS. Most examples I've seen have worked fine when loading an external html file, even the package mentioned above. My … | |
Hi I'm doing a project which requires a registration/login page. I have created both registration and login html pages and have done the validation servlet for the login page. I've also attempted the validation servlet for the registration page, but this is where I am struggling because I can't get … | |
installing java on my firefox explorer get right to the end of the installation and it gives me an error message saying "error 25099. unzipping core files failed" doesnt allow me to do please help as my name says im a big noob when it comes to pc shit. | |
Hello DaniWeb. Here is my problem. I have an XML file that is arranged like this.. <document> <Word>apple</Word> <Word>hat</Word> <Word>car</Word> </document> I'm trying to figure out how to grab the actual words. This is how I'm doing it now. [Code] DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(new File("data/general/words.xml")); NodeList … | |
I'm trying to execute this code to open a java GUI to run queries on the oracle express database I have set up but at the actionPerformed() class, I keep getting java.sql.SQLException errors. What I would like for it to do is when you hit the button, that table from … | |
Guys a little help please. I already finished my program, I just need enter codes in order for the user to simulate the program again using loop. How do you do that? | |
hi; i am new to java.i want to get data from db for jcombobox.plz help me | |
I've played around with HTMLEditorKit and HTMLDocument, and while I've managed to do the parsing I needed, I also need the complete source code of the document to pass along to a webkit renderer. Java's existing document throws out some tags after I read it in. [code] HTMLEditorKit kit = … | |
I am using the netbeans gui builder. I dragged a filechooser onto my frame, and it does almost everything I want it to do. How do I remove the buttons? I dont need them - the user just has to select a file, or type in a file name, the … | |
I am going through the java basic. I need some simple sample programme using the concept of class and interface with description. | |
Hi members! Sorry I need a help with this snippet. I am still workin' on it... the thing is all the three buttons ain't working. And Can anyone tell how to compare the values of username and password against a database in Ms access. Thanks Here is my code import … | |
hi All i have a question. plz answer if u can. i must b very thankful to u question is Why use abstract classes at all? Why not just declare a class and then make sure you never instantiate any variables of that type? thnx in advance | |
import javax.swing.*; import java.awt.*; public class sample { public static final int width=500; public static final int height=500; public static void main(String[] args) { JFrame mywindow=new JFrame(); myWindow.setSize(Width, height); JLabel myLabel= new JLabel ("How do i insert picture in this window? I want to create a photo gallery on this … | |
Hi friends, I am facing a problem with Signed jar file. I have two jar files.One contains applet class and other jar file contains supportive classes used by that applet.I was able to self sign the applet jar file let name it as "ScreenApplet.jar" using jarsigner tool. The supportive jar … | |
Hi, I'm trying to call a bunch of methods during run-time using reflection, but I'm getting an exception saying "IllegalArgumentException: wrong number of arguments". Here's some information on the variables used. - All elements of mailTestClass[] are classes that extend AbstractTestCase. (FirstTestCase extends AbstractTestCase and FirstTestCase.class is the first element … | |
Hello, I built a chat application that uses sockets and TCP/IP protocol. The client is an applet. The problem is I cannot connect the applet client with the desktop server application. [I]If I run the applet inside the applet viewer in NetBeans it works perfectly[/I]. I even tried the applet … |
The End.