35,618 Topics
![]() | |
OK I am writing a custom application which needs to do a limited amount of web browsing... i.e. browsing is not its main intention but yes it is ABSOLUTELY necessary for it to be able to browse the web.... I am using a JEditorPane with the HTMLEditorKit for the display … | |
Hello, I have written a small java program that simulates a Lottery draw. I would like to generate multiple "lotto tickets" e.g 20 tickets containing 7 numbers at one time when i run the program rather than just a single ticket every time i run the program. Below is the … | |
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 … | |
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 … | |
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] … | |
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 … | |
![]() | 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). … |
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] | |
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 | |
//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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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{ … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.