36,051 Topics

Member Avatar for
Member Avatar for morrigan.c

I'm a newbie, and...cannot find the answer on the Web. If you want to use the OR operator in Java, "||", how can you type it so the compiler will accept it? The character "|" on the same key with the backslash ("\") looks like it should be the right …

Member Avatar for morrigan.c
0
317
Member Avatar for bigsurya

I've written this code to obtain an alternate display of '|' and '\*' starting with '|'. To ensure the altering of o/p I've used the yield(). But this doesn't seem to serve the purpose. Can someone point out where have I gone wrong ? import java.util.*; class Pat extends Thread …

Member Avatar for phriendtj
0
123
Member Avatar for ceyesuma

Hello Could someone tell me if this code is even close to code for a login using a DAO and an embeded db? if not there is a proceedure losted below that I really don't understand the '?' and how to use the uid to query the db [b]specific question[/b] …

Member Avatar for ceyesuma
0
381
Member Avatar for anoopasta

Dear All, I have a dedicated server with Godaddy and I am running XMLDigitalSignatureAPI on it. It works fine on my local server but when I uploaded the war file to the production server I got the error below and if I try to refresh the page again I get …

Member Avatar for anoopasta
0
273
Member Avatar for Illidanek

Ok so i have been looking this up on the internet but all the stuff i've been finding has been for other stuff or worked in a different way than i wanted it to. So what i need is a Filetype filter for a FileDialog (not a JFileDialog or anything). …

Member Avatar for masijade
0
1K
Member Avatar for pradeepktg

Hi, I have developed application in jsp and apache tomcat. How to achieve extension less url? For eg, if have [url]http://www.xxx.com/yyy.jsp[/url] as [url]http://www.xxx.com/[/url] and [url]http://www.xxx.com/user/yyy.jsp[/url] as [url]http://www.xxx.com/user/[/url]

0
59
Member Avatar for pankajagar2002

Hello friends. I want to know what happen if any or all thread is in waiting condition and no notify() is called on thats thread. Please help me to solve this. Thanks in advance

Member Avatar for moutanna
0
92
Member Avatar for evak77

//import classes import java.io.*; import java.lang.*; import java.text.*; //Class Header public class Mortgage3 { //Public method header public Mortgage3() { } //Get user input public double loanAmt() throws IOException { //Declare Method Variables double PrincipalIn = 0; String answer; boolean done = false; BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in)); //Loop …

Member Avatar for DeadSoul
-1
104
Member Avatar for Fadorn

Hi All, I am new to Java, and I can not figure out why my code will not stop to get input from the user for the second employeeName at the end of my while loop. Everything else seems to work as it should. After the first calculate is completed …

Member Avatar for Fadorn
0
105
Member Avatar for iamchamith

I open new window using javascript as like this, in the [B]Main page[/B] using several links & that link pass the id to the javascript function call moreWindoe() eg->[CODE] <a onclick="morewindw(1)">link 1</a> <a onclick="morewindw(2)">link 2</a> <a onclick="morewindw(3)">link 3</a> [/CODE] [CODE]function moreWindow(id){ window.open('moredata.aspx?val='+id+'','mywindow','width=650,height=540','location=no'); return false; }[/CODE] when i am click the …

0
77
Member Avatar for sfrider0

I've created a link checker in the past that checked all the links on a web page. I created it in C#, then made it work for an asp.net page. I've taking a Java class since then. I found this code on the internet that is supposed to check the …

0
77
Member Avatar for genesistr

hi, I have mfc c++ activeX object and javascript code to use that object. there are 2 types of callback in my activeX object. First: triggered itself(my activeX object) second: triggered via external dll. My javascript code can catch the first callback but although the message arrives to the FireEvent …

0
33
Member Avatar for smoothe19

How do I create functions that do the following? Find: will do a case sensitive search of the text starting at the beginning. If a match is found, the text will be highlighted on the screen. If no match is found a message stating that no matches were found should …

0
50
Member Avatar for evak77

How do I stop this from looping over and over? [code] import java.text.DecimalFormat; import java.util.Scanner; public class Loan1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); double interest; double payment; double amount; double term; DecimalFormat decimalPlaces=new DecimalFormat("0.00"); while (true) { //keep looping until we see stop …

Member Avatar for wildplace
0
103
Member Avatar for cppnewb

Hello...I am new to java and have written some code...and now I am getting a 'SyntaxError: Parse error'. My code is : [code] if (window.innerWidth && window.innerWidth <= 480) { $(document).ready(function(){ $('#header ul').addClass('hide'); $('#header').append('<div class="leftButton" onclick="toggleMenu()">Menu</div>'); }); function toggleMenu() { $('#header ul').toggleClass('hide'); $('#header .leftButton').toggleClass('pressed'); } } [/code] Any help is …

Member Avatar for BestJewSinceJC
0
77
Member Avatar for Hodson

I have created a very simple Tic Tac Toe game using NetBeans 6.8. Swing is used in order to create the grid. I can build and run the game with no problem. What I now want to do, is have this uploaded onto a website (along with other applications I …

Member Avatar for Hodson
0
269
Member Avatar for Rekuta

Hi everybody ! I am trying to use a different image using a keyboard input such as this: private ImageIcon GameIcon = new ImageIcon("f:/School Programmation/Dungeons of Darkness.gif"); private ImageIcon GameIcon2 = new ImageIcon("f:/School Programmation/untitled.gif"); public RPG18() { setLayout(new FlowLayout(FlowLayout.LEFT, 10, 20)); add(keyboardPanel); keyboardPanel.setFocusable(true); add(new JLabel(GameIcon)); repaint(); } and here's the …

0
39
Member Avatar for ddempsey96

I am having the strangest problem. Here is my code: <c:set var="updAlloc" value="" /> [CODE]<if test="${1==0}" > If Statement: ${1==0} <c:set var="updAlloc" value="disabled" /> </if> Update Alloc equals ${updAlloc}[/CODE] This is the output: [CODE]If Statement: false Update Alloc equals disabled[/CODE] Originally, I was testing a different variable, but realized that …

Member Avatar for ~s.o.s~
0
87
Member Avatar for Stefano Mtangoo

I wonder why this does not insert data :-O [CODE=JSP] <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import = "java.sql.*" %> <%--@page import = "dbfiles.*" --%> <% //VDbManager mgr = new VDbManager(); String sqlApp = "INSERT INTO application VALUES (NULL, 810, 2010-08-26, 2010-10-27, 30, \"Dummy Leave\", \"Dummy Reason \", \"Applied \")"; Class.forName("com.mysql.jdbc.Driver"); Connection …

Member Avatar for Stefano Mtangoo
0
180
Member Avatar for bryan69

hi guys, i would like to develop a file monitoring system to detect if the files got edited or copied to an external device etc. currently, i can monitor if the file got edited or deleted.However, if the file got copied, it would not be able to. any suggestions?

0
58
Member Avatar for garnier4i

hi i am a beginner in java language...the below program has should close the window created but it is just minimising,and maximasing the window i am using Edit+ v3.12 [code]import java.awt.*; import java.awt.Label; import java.awt.AWTEvent; import java.awt.event.WindowEvent; public class HowdyByeWindow extends Frame { public static void main(String args[]) { new …

Member Avatar for JamesCherrill
-1
110
Member Avatar for nagesh1811

acutally above code is sorting employee class objects based on EmpID or based on EmpName but my requirement is if know the comparator (on which basis sorting should occur) @ runtime how can we achieve that :)[code]package CollectionsOps; import java.util.Arrays; import java.util.Comparator; /** * * @author King@java */ class employee{ …

Member Avatar for javaAddict
0
195
Member Avatar for senthil12345

hi all, i have a problem when i click the link in jsp page. whenever i am clicking the jsp page link it wants to open a pdf file, the pdf file is located in remote system. its working properly in Internet Explorer. but i am opning this in FireFox …

Member Avatar for saikatparbat
0
301
Member Avatar for ubi_ct83

Hi guys, want to discuss with u guys and begging your opinion or suggestion to solve my problem. i have this input input[0]={0,1,2,3} input[1]={0,1,2} input[2]={0,1,2,3} input[3]={0,1} value=2,3 and when value=3,binary binary[0]={0,1,1,1} binary[1]={1,0,1,1} binary[2]={1,1,0,1} binary[3]={1,1,1,0} and when value=2,binary binary[0]={0,0,1,1} binary[1]={0,1,1,0} binary[2]={1,1,0,0} binary[3]={1,0,0,1} if user choose value=2,result should b like this: (i …

Member Avatar for ubi_ct83
0
80
Member Avatar for luttinj

Hello, I am making a show quiz show applet in Java and I am now basically done it, all I need to finish it off and make my teacher happy is to find out how i would get the applet to show the user what their score is at when …

Member Avatar for BestJewSinceJC
0
160
Member Avatar for sharathk60

hi i have a problem , i want use the exisiting jsp page which is in a different project want to call that jsp in another project using servlet... my code jsp page and servlet pages are from two different projects SampleWebProject1:- WebContent: Web-INF:- jsp:- Sample.jsp SecondSampleProject:- src:- sampleServlet.java i …

Member Avatar for jwenting
0
71
Member Avatar for skyzer

I have ordered points(x,y) for a route and i got a method optimize which removes consecutive points which distance between them is less than delta (delta=3). The first rule tells that if p1 and p2 distances are lower than delta, then remove p2 from my route. Second rule is same …

Member Avatar for BestJewSinceJC
0
109
Member Avatar for Democles

I'm am currently attending college and taking a java programming class. I am somewhat stumped. I get thrown in a situation and need to figure out the answer, now I do have some programming experience and in this case, my thinking would be to use a iterator. I do not …

Member Avatar for BestJewSinceJC
0
122
Member Avatar for SebFr

Hi, I want to be able to call a Javascript file from a C# Windows Application. This is just a stand alone C# application. What I want to be able to do is to execute this JavaScript file, think of it as a function, and be able to pass parameters …

Member Avatar for kvprajapati
0
3K
Member Avatar for ceyesuma

I have been trying to find how to set a property for a derby connection to have a prepared statement perform several INSERT queries. it was suggested that this may be possible. [QUOTE]Are you trying to execute multiple statements with a single sql string? If so, have you activated the …

Member Avatar for masijade
0
118
Member Avatar for ku95

Im currently working on a Connect4 progrqam and I'm trying to convert a string into an integer. You will see that it is under the Connect4View. Its really frustrating as I'm struggling to find a way round this. Is there a possible solution to this and can someone please tell …

Member Avatar for ku95
0
162
Member Avatar for RossMc

Hi, I need to create this Carpark application that looks like this [url]http://i35.photobucket.com/albums/d171/rossmc/java-1.jpg[/url] I have got the buttons to work but when I try to make the grid it is not showing with the buttons when I run it. This is the code I have so far. Does anyone know …

Member Avatar for masijade
0
131
Member Avatar for AFB

this erorer message appear to me when i run projact --------------------Configuration: afb - JDK version 1.6.0_17 <Default> - <Default>-------------------- Exception in thread "main" java.lang.StackOverflowError at sun.awt.Win32GraphicsConfig.getBounds(Native Method) at sun.awt.Win32GraphicsConfig.getBounds(Win32GraphicsConfig.java:215) at java.awt.Window.init(Window.java:393) at java.awt.Window.<init>(Window.java:432) at java.awt.Frame.<init>(Frame.java:403) at java.awt.Frame.<init>(Frame.java:368) at javax.swing.JFrame.<init>(JFrame.java:158) at Convert.<init>(Convert.java:10) at Convert.<init>(Convert.java:115) at Convert.<init>(Convert.java:115) at Convert.<init>(Convert.java:115) at Convert.<init>(Convert.java:115) at …

Member Avatar for quuba
0
243
Member Avatar for bigsurya
Member Avatar for Hakoo

-----> How can I make one report file using JSP so I can send to other user and he/she can refer it?? -----> And How can I redirect one page to other page with some delay such one page can display 5sec and thn redirect automatically redirect to other page. …

Member Avatar for Stefano Mtangoo
0
97
Member Avatar for spotlight87

hi guys >> i need ur help please >>> i ve created a login page which includes user name and password and i created a welcome page which contains the required codes for connection and verifying the username and password from oracle database .. when i run the login page …

Member Avatar for spotlight87
0
310
Member Avatar for bettybarnes

hi guys i'm having a problem on how to view my background it should be like this [URL=http://img148.imageshack.us/i/applet.png/][IMG=http://img148.imageshack.us/img148/9121/applet.png][/IMG][/URL] Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL] the pacman/pink.jpg should enter the house, but how im so lost in this, i dont have an idea...anyone please help me... here's my code [CODE]import java.awt.*; import java.applet.*; public …

0
40
Member Avatar for MrBlack

I m using NetBeans IDE6.8 to create a application.for this i use Japplet form . when i darg and drop buttons and textbox, i cant give them a static position.when i move a textbox some other textbox or label also go here and there, how can i prevent this , …

Member Avatar for cale.macdonald
0
59
Member Avatar for PhiberOptik

Hello, I'm working on a web scraper of sorts, my main goal is data, I was wondering what a good, efficient way of organizing the data that I'm downloading is? Here is what I have, I download the webpage, and ends up as a FileReader object, then I send it …

Member Avatar for cale.macdonald
0
115
Member Avatar for Demon_singh

Could anybody help me with this code 1. want to read a file into an array. 2.three button should sort it 1st product name should sort it alphabetically, 2nd maximum stock level which sort by maximum value, 3rd price sort by maximum value on the top. thanx cheers Demon

Member Avatar for moutanna
0
110
Member Avatar for evak77

I have this program that is giving me some trouble, can anyone tell me what is wrong. This is the error i am getting trying to run program java.lang.NoSuchMethodError: main Exception in thread "main" Exit code: 1 There were errors

Member Avatar for JamesCherrill
0
50
Member Avatar for tiny7415

I am looking for a host that supports jsp files and xml. I went to several host provider and I noticed that most of them supports asp and not jsp. Is jsp a standard language that every host supports it?

Member Avatar for Camy
0
150
Member Avatar for KONTOL

public class AddPlanePanel extends JPanel implements MyObserver { private JLabel planeLabel = new JLabel("New Plane "); private JLabel nameForPlane = new JLabel("Name:"); public JTextField inputPlaneName = new JTextField(15); private JButton button = new JButton("Add"); private JLabel status = new JLabel(); private JLabel typeLabel = new JLabel("Type:"); private String[] typeStrings = …

Member Avatar for moutanna
0
184
Member Avatar for fabunmi adeniyi

this code runs succesfully onnet bean, though it compiled in prompt but compiler is telling me that it is not checked[code]import java.io.*; import java.util.*; class RandomSelection { public static void main(String[] args) { try{ FileInputStream fstream = new FileInputStream("c:\\filea.txt"); DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); …

Member Avatar for moutanna
-1
124
Member Avatar for flyingcurry

I tried using this code below[CODE]if (choice == 6) main (); //takes the user back to the main method to the Main Menu[/CODE] but it won't compile. error message: [QUOTE]No applicable overload for the method named "main" was found in type "movitetogo". Perhaps you wanted the overloaded version "void main(java.lang.String[]args)throws …

Member Avatar for fabunmi adeniyi
1
3K
Member Avatar for kalaiselvi.v

File file = new File("filename"); FileInputStream fis = new FileInputStream(file); len = (int)file.length(); //prepared stmt st.setBinaryStream(1, fis, len); I have uploaded the file into mysql database from servlet program. But how to read that file or tell me how to upload a doc into the database.

Member Avatar for electricrain
-1
921
Member Avatar for Amoryethel

This is my first post here, so excuse me if I'm not posting my question in the correct format. I'm trying to make a program that determines whether the score entered is passing (higher than 70.0) or failing (lower than 70.0). The array I'm using needs to be declared as …

Member Avatar for moutanna
0
107
Member Avatar for sreenivas.m41

hello, can any one help me ,i am not getting mysql datbase values from server, to my system through applet it display all values null....but locally the program getting the values is there any browser settings..or any thing need i have to do pls help me................

0
17
Member Avatar for Chaster

Hi all, I have two strings, in which the order of words may differ. I would like to hash both of them and obtain the very same hash code for them. So I need a hash that returns the same value for "Hello world" and " world Hello". Does such …

Member Avatar for javaAddict
0
80
Member Avatar for Raghav686

The requirement is to have an applet which refreshes it self every second. I have created a thread for this purpose. I am using paint function to display all the values within a rectangle. The problem is that 1.i am not able to call paint() function from run(). 2. The …

0
30

The End.