35,586 Topics

Member Avatar for
Member Avatar for Member 784374

Hi all, I was wondering if any of you could tell me how to convert a date format that is being returned in my XML. The element content is being returned as a string of form "2010-11-16T09:00:00Z". The XML is a copy of some metadata of an object in my …

Member Avatar for JamesCherrill
0
90
Member Avatar for BalagurunathanS

Hi Friends.. In my web application(ASP.net), i need to disable the "Back" button in the browser.Moreover i also need to disable the Backspace key in my keyboard when my web page is run..How to do it with javascript..? Someone help with javascript as early as possible.. Regards, Balaguru

Member Avatar for @developer
0
1K
Member Avatar for gedas

hey guys, i am working on coordinates in one program and there is a line such as this one: [CODE]int xx =Math.round((int) getWidth() * 100 / 768);[/CODE] can somebody tell me what calculation is actually taken before the value is set to int xx thanks a lot for any suggestions

Member Avatar for gedas
0
150
Member Avatar for Codeslinger

/*THE OUTPUT SHOULD BE LIKE THIS: 2 4 6 8 10 - 30 //gets the sum of first column 12 14 16 18 20 - 60 //gets the sum of second column 1 2 3 4 5 - 15 //gets the sum of third column 6 5 4 3 2 …

Member Avatar for apines
0
91
Member Avatar for Monkey-huh?

[CODE]import java.util.*; public class Sort { public static void main(String[] args) { //driver method int[] array = new int[10]; System.out.println("Please enter ten integers"); insertionSort(array); } public static void insertionSort(int[] array) { Scanner kybd = new Scanner(System.in); int min, temp, n = array.length; for (int i = 0; i < n; …

Member Avatar for masijade
0
102
Member Avatar for serph09

Edit: Oh, nvm. I just redid the code and figured out how to write the tester class. Sorry guys for the trouble:( This thread can be deleted. So I have this code (not all was written by me). But I don't know how to start writing a tester class for …

Member Avatar for javaAddict
0
163
Member Avatar for rony

Hiya, I am using following Java file which creates a GUI, in the input field if i put any character why dont I see the JOptionPane.showMessageDialog pop up window as mentioned in the code? Any clues? Thx Rony //import statements import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.text.DecimalFormat; …

Member Avatar for javaAddict
0
746
Member Avatar for blknmld69

I would like to know how to take a selected Item string ("Allen Hall: $1,500 per semester") from one combobox and another selected Item string ("7 meals per week: $650 per semester") from another combobox and have the output to be ($2,150) the total of the two strings added together?

Member Avatar for javaAddict
0
103
Member Avatar for soteri0s

Hello everyone, I know this question has been asked before but it is possible to write a keylogger in java? Before assumptions are made I'm not trying to hack anyone or do anything illegal. I simply have a team project in my data structures class and I am an aspiring …

Member Avatar for peter_budo
0
235
Member Avatar for serph09

I have these three classes: Student.java [CODE]public class Student { private int grade; private String name; public Student(String n, int g) { grade = g; name = n; } public int getGrade() { return grade; } public String getName() { return name; } }[/CODE] GradeBook.java [CODE]public class GradeBook { private …

Member Avatar for ~s.o.s~
0
123
Member Avatar for oneml

Hi I am trying to create a program in java which will scan for words within a text file. The program will scan the list containing a bunch of words in every line some words may be repeated. The program should scan the text file when I input a word …

Member Avatar for ~s.o.s~
0
172
Member Avatar for sri.k

Hi all, This is sri. I've done some program to read xml elements in java.But i didnt get them in a structured way like root element and its name and child elements and their names.I am getting end tag names after tag value also.so pls help me in getting elements …

Member Avatar for sri.k
0
167
Member Avatar for Codeslinger

PLEASE MODIFY MY CODE TO COMPUTE FOR THE AVERAGE OF FIRST GRADING, SECOND GRADING, THIRD GRADING AND FOURTH GRADING PERIOD, THE FORMULA IS THIS AVERAGE COMPUTATION First Grading Period: Average = Sum of grades / Number of subjects Second Grading to Fourth Grading Period: Average = (30% of the Average …

Member Avatar for apines
0
197
Member Avatar for muncher10

I need it to read all three of the numbers and up them back least to greatest. As of right now all it prints is 0.0 for all 3 and true. How do I get it to not print true and 0.0 and print the acual numbers. [CODE]public class Floating …

Member Avatar for theonly
0
79
Member Avatar for incubus9x9

So my teacher gets mad at me when I ask questions so I'm coming here for your help cause you guys a life savers :) OK So what I understand about this project is we have a file with numbers and we have to make an array to read it. …

Member Avatar for kramerd
0
192
Member Avatar for jiraiya

Hi everyone, I'd like to write a small application to basically read in some text from a file, display it in a GUI (I've done this using a textpane), and then change the font color of certain words if they exist in the text (say from the default color to …

Member Avatar for Ezzaral
0
99
Member Avatar for Roy1287

How can I use this but not return FALSE because of decimal in numbers? [CODE]public class isNumeric { // This method checks if a String contains only numbers public boolean isNumeric(String str) { //It can't contain only numbers if it's null or empty if (str == null || str.length() == …

Member Avatar for jon.kiparsky
0
84
Member Avatar for intes77

sub class [CODE] public class Exer2 { public void setLength(int x) { this.listLength=x; } public int getLength() { return this.listLength; } int listLength=getLength(); int list[]=new int[listLength]; public void display() { System.out.println("The array length is: "+list.length+" "); } } [/CODE] main class [CODE] import java.util.*; public class Output { static Exer2 …

Member Avatar for intes77
0
148
Member Avatar for mklein

Dear all I came across the following very simple code for dragging a square around using javascript. It is drawn on the html5 canvas. Despite being very simple it has certainly exposed some gaps in my pretty flakey javascript knowledge. I am generally ok with the idea of drag and …

Member Avatar for Graphix
0
145
Member Avatar for natha_peepli

i just learned how to get input from keyboard...' [CODE] import java.io.*; class Fish{ public static void main(String[] args) { BufferedReader Keey = new BufferedReader(new InputStreamReader(System.in)); System.out.println(Keey.readLine()); } } [/CODE] But whenver i compile it..its shows me the follwing exception.. C:\Program Files\Java\jdk1.6.0_22\bin>javac Fish.java Fish.java:7: unreported exception java.io.IOException; must be caught …

Member Avatar for apines
0
195
Member Avatar for amras123

for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) if (j = i) table [i] [j] = 1; else table [i] [j] = 0;

Member Avatar for Dhruv Gairola
0
86
Member Avatar for hanvyj

I'm trying to print at a resolution other than 72 DPI, I managed this using the PrinterResolution (see the code below) but I am having a problem with the printable area. When I change the resolution to 300 DPI I just print everything smaller (ie the getImageableWidth() etc are still …

0
60
Member Avatar for Son of a gun

Evening I am writing a small program to present a UI that when selecting 1 item from a drop down list then gives the user a selection of data relating to their selection. For instance if Ford cortina was selected from a list of Ford cars on screen in the …

Member Avatar for quuba
0
127
Member Avatar for hiddenman91

**I make servlet and in servlet we make dropdown menu for display names against id but when we run the servlet drop down menu created but no values displayed form database in dropdown menu so pls help me. sorry for bad english** import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.PreparedStatement; …

Member Avatar for hiddenman91
0
284
Member Avatar for rincethomas33

i want to create a menu. if i press the menuitem,then a certain action will occure.. and so on... give the details please...

Member Avatar for Dhruv Gairola
0
123
Member Avatar for Tankadin

Hi folks....I have two separate copies of this program to show how my thought process worked in initial creation and how it has changed since I was helped by you folks in my airline reservation program. It does not work but I DID try to apply what I have learned …

Member Avatar for Tankadin
0
721
Member Avatar for MoZo1

Hi! I'm reading COM port from under java. Like: [ICODE]new RandomAccessFile("COM1", "rw");[/ICODE] I know, it looks dumb, I would be more happy with ActiveX too... But I need the ability to adapt to different kind of systems in the future, and COM can be read as file on almost every …

Member Avatar for MoZo1
0
96
Member Avatar for Dean_Grobler

Hi there, I'm getting an error saying: non-static variable MainList cannot be referenced from a static context. My snippet of code where the error is occuring: [CODE] //this method is in a class called ViewContact public void printInfo(){ int index = MainScreen.MainList.getSelectedIndex(); } [/CODE] Now the List "MainList" is in …

Member Avatar for JamesCherrill
0
124
Member Avatar for XxPKMNxX

Been asked to write a program using Cream library. We have to used Constraints, but i have no idea what they are Could someone give an explanation of one and possibly some examples?

Member Avatar for XxPKMNxX
0
81
Member Avatar for Ronik

hello sir m find a apache poi jar file what m confuse where to put this jar file so plz help me nd send a mail me procedure of use a poi jar file set class path and other details. plz send me on my mail id <snip>

Member Avatar for peter_budo
0
78

The End.