36,051 Topics
![]() | |
For synchronized block, an object has been passed.The question is,Why & when it is passed & what is the purpose of passing an object? -Thanks in advance | |
hi I have to create a help menu in my project for that i had made html pagesand my problem is I cannot connect that html pages from help menuitem. pls helpme and guide me for that. thanks for ur response shashikant.v | |
in jsp,i have "p_id","name","date" and "products"."p_id is primary key. i executed jsp page with oracle. but one thing i had no fields and submit button. pressing submit query,next page i had blank page , plese how to do it? | |
This is a very basic implementation of a Julia Set Fractal Generator. All of the variables are coded in, so feel free to change them to experiment with different results. I give an explanation of Complex Numbers and the Complex Plane, but you should look it up for your self, … | |
how do open port on firewall using java programmatically... any upnp code ... plz help me its urgent......... | |
im just worried about our quiz this week. My problem is to display from no.s 10-1000 w/c is divisible by 10 using for loop.while loop,do-while netbeans.... | |
[CODE] higher = new Button("Higher"); lower = new Button("Lower"); creditin = new Button("Enter Credit"); totalcredit = new TextField(10); stopsound = new Button("Stop Sounds"); startsound = new Button("Start Sounds"); add(higher); add(lower); add(creditin); add(totalcredit); add(stopsound); add(startsound);[/CODE] for the life of me I cant figure out how i can add coords to those … | |
[CODE]package javaapplication1; public class Main { public static void main(String[] args) { //display the table heading System.out.print(" Multiplication Table\n"); System.out.print("------------------------------\n"); //Display the number title System.out.print(" "); for(int j=1;j<=9;j++) System.out.print(" "+j); System.out.print("\n"); //Print the body of the table for(int i=1;i<=9;i++) { System.out.print(i+" | "); for (int j=1;j<=9;j++) { if(i*j<10) System.out.print(" "+i*j); … | |
this is the source code [url]http://www.bennychow.com/download/pacman_eclipse_project.zip[/url] works as an applet but I want to create tests (its due tomorrow :/) for this app and in order to do that I need to run it as an application so I created a main method: [CODE] public static void main(String[] args) { … | |
products applications:in jsp, i executed entry products and i executed modify products. but How to retrive later all productshistory? for example:productshistory | |
Hai friends, In synchronization block why we are passing this or object? public int getCount() { synchronized (this) { return count; } synchronized (obj) { } please clear by doubt? | |
Well, here i m trying store the some vertices(4) in an array. and trying to read them. But i m getting an error of "Array Index out of Bounds Exception. I know the error is in the line i have highlighted(red). And i have tried various methods. But not working. … | |
[CODE] import java.util.Scanner; public class Card { private boolean rankBad; private boolean suitBad; private boolean invalid; private boolean valid; private int value; private int altValue; private int suit; private int rank; private int numValue; private int status; private boolean isJack; private boolean isAce; private String card; public Card() { Scanner … | |
Alright I've pretty much exhausted all other sources of information and still can't seen to understand how to do this, so here is my question: I have a program that loads up a txt file, then displays a menu and allows people to choose options from that menu. If they … | |
I am using FF 3.5.5 and it keeps opening new tabs and redirecting my google search results to random pages. Can someone please help? Mbam log: Malwarebytes' Anti-Malware 1.41 Database version: 3110 Windows 5.1.2600 Service Pack 3 11/30/2009 11:53:12 PM mbam-log-2009-11-30 (23-53-12).txt Scan type: Full Scan (C:\|) Objects scanned: 296789 … | |
does anyone here know how to create an electronic bandit game that has the following characteristics;add credit put money to play the game,reduce money from you credit when you loose,randomly spin pictures,when pictures match u get credit,when it ends you hav the choice of playin again,and you can login to … | |
Hi... I've been trying to edit and rewrite my code for quite a while now but no matter what I do the program only ever reads the last instance of a class that I declare. For example, [CODE]Fraction ni = new Fraction(3,4); System.out.println(Fraction.lcd(ni,new Fraction(3,2)));[/CODE] > This code is supposed to … | |
Hi, Daniweb I am stuck on my hangman game project, I don't know where to start with my last four methods [code] import java.util.*; import java.awt.*; import java.applet.*; import java.io.*; import java.net.*; public class Hangman() { final int maxTries = 5; final int maxWordLen = 20; char secretWord[]; int secretWordLen; … | |
I am trying to produce a query using a java server page which will go through all the elements in an arraylist to see if there are any matches, can anyone help? Thanks | |
Hi, I have a jRadiobuttongroup. I have 3 types of jradiobuttons in my group. [CODE]A B C 1 1 1 2 2 2 3 3 3 4 4 4[/CODE] Now the problem is that when I selected suppose A type of buttons some of the A type buttons get selected … | |
Hi All, Please help me to solve this problem. I developed a web applicattion with following versions : Servlet Engine: 2.5 JSP Engine: 2.1 Server: Apache Tomcat/6.0.18 JRE Version = 1.6.0 My destination web server having following versions: Servlet Engine: 2.4 JSP Engine: 2.0 Application Server: Apache Tomcat/5.5.27 JRE Version … | |
I have this code: [CODE]try { robot = new Robot(); robot.mouseMove(0,900); robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); }catch(Exception e){}[/CODE] And I want it to click the "Start" button on Windows computers. The mouse moves to the correct location, but does not click. Advice? | |
Hi, I want to "click" with the mouse using a Robot object like this: [code] Robot bot = new Robot(); bot.mousePress(InputEvent.BUTTON1_DOWN_MASK); bot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); [/code] This results in: [B]Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Invalid combination of button flags[/B] I even delayed the process before it starts clicking to have time to release … | |
Hello Friends, my name is Anurag.. am doing MSC(Comp. Science) I need a Project description mosty in JAVA(NETWORKING,Client/Server) Something which is of more developing technology from INDUSTRIAL POINT OF VIEW.. I would be very thankful.. | |
anyone enlighten me? i have to find the median...below i found the mean and read the question wrong. how do calculate the median? i have my text input file which has 7 ints, 1-7, so i kno #3 will show up for median...but i dont know how to code it...pls … | |
How to draw a circluar arc of given radius say 20 passing from two Given points. I have seen the function Arc2D.Float but can figure out how to find the required parameters for the contructor and also for QuadCurve2D cant figure out the control point. | |
Here is my code - i want b1 to close the window when i press it public class Main { public static void main(String[] args) { javax.swing.JFrame w1 = new javax.swing.JFrame(); javax.swing.JButton b1 = new javax.swing.JButton(); w1.setBounds(0,0,300,300); java.awt.Container c = w1.getContentPane(); c.setLayout(null); b1.setText("Exit"); b1.setBounds(100, 100, 100, 30); c.add(b1); w1.setVisible(true); } … | |
hi, I am facing a new problem when resizing the form. I have a JTextPane on the JInternalFrame which occupy all the form space at initial stage. we have a button to add a new JTextPane on the form at run time. The new JTextPane is to be added at … | |
Hello All, While Browsing thru some sites I visited a site [url]http://www.tattooart.pl/[/url] When you visit by links it work fine but when I delibrately omitted some text in url i can see the Directroy structure and can even access them [url]http://www.tattooart.pl/pliki/[/url] Can you People focus as how this can be … | |
I want to create a file in one of the application folder of tomcat. For.eg Assume that i have a web-app named Test, in that i want to create a file called as report which is generated based on some condition using jsp. If i give a file path as … | |
I am trying to write a recursive method to print an increment of a number of asterisks specified. triangle(5) would print this: * ** *** **** ***** However, the code I wrote seems to do the opposite and I'm not sure how to reverse it although I tried and it … | |
I've found this online(Can't remember where) and I thought it might be usefull to other people as well:[CODE]package org.kodejava.example.text; import java.util.List; import java.util.ArrayList; import java.util.Locale; import java.util.Collections; import java.text.Collator; public class StringShortWithCollator { public static void main(String[] args) { List<String> fruits = new ArrayList<String>(); fruits.add("Guava"); fruits.add("Banana"); fruits.add("Orange"); fruits.add("Mango"); fruits.add("Apple"); // … | |
[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TravelExpenses extends JPanel { private JTextField days; //declaring textfields and labels private JTextField lodging; private JTextField airfare; private JTextField taxiCost; private JTextField miles; private JTextField rental; private JTextField seminarFees; private JTextField parkingFees; private JLabel daysL; private JLabel lodgingL; private JLabel airfareL; private … | |
how do edit windows registry using java... any windows java api is avail.. | |
Hi, I am facing a problem in JTextPane. Actually we are creating a editor like application in Java Swing. In JtextPane we type the matter and set some metter as heading1, heading2 so on as user required and some matter as simple story. My problem is that how can we … | |
Hello! I am supposed to write a recursive method for my assignment in my class but I'm not sure what is wrong with the code I wrote. The method should print all of the letters of the alphabet up to (including) the parameter value. Some examples of what it's supposed … | |
Hey all - yes, this is another thread asking for some homework help, but I've got a solid start, just looking for some fresh ideas. Anyways, the task is to create a java clock class and access/use it from a driver. I saw something similar on here, but not quite … | |
I need to write a combination of String and Images to a file. The catch is that I have to write some String, then the Image, then more String again. Does anyone have any ideas how to do this? Should I use BufferedImage? | |
Hi, I need to create an adjacency list for a weighted graph. The input is given from a text file. I have created an array assigning each index a vertex. Now i have to link that array with a linked list. For example, vertex 'a' showing all the vertices that … | |
hey guys, I have a table "items" from which I need to select items using two drop down lists ,the 1 st drop down list works, the second one doesn't fetch the parameter passed, when used item_id=? <sql:param value="${param.item_Id}"/> ?? ,but when I give a value it works..... I'm using … | |
I am trying to write a method that will return the month with the lowest rainfall amount. The problem is that I have to initialize my variable but then my method always returns a "0". How can I fix this problem? Here is my code: public int getLowestRainFallMonth() { double … | |
[QUOTE] Please! need help in removing (or set the element value to 0) one element of an array based on the string value that is passed to the remove method. The array contains string names read from a file. I don't know if I should post the entire code on … | |
As The title says pretty much, auto resize and auto format are making this very hard for me to make GUI, can I turn it off? | |
Hi, I can't figure out why my exit button is not working as all the other buttons in my code seem to be working. I have given the code below. The constructor for the button is [code=Java] private JButton exit; .... add(exit); .... exit = new JButton("Exit"); exit.addActionListener(this); [/code] The … | |
I have two different parts to my program. My FundRaising.java is my problem. I'm having problems with my print statements. Why are the correct numbers not showing up? I keep getting 0. System.out.println (booster1); System.out.println (booster2); I ask the question to get the numbers and I keep on getting 0 … | |
I'm using [I]javax.xml.parsers.DocumentBuilderFactory[/I] to load an XML file. The file contains paired elements like so: <A></A> <B></B> <A></A> <B></B> <A></A> <B></B> So if I did the following: [code] Element element = <root node element> NodeList nodeListA = element.getElementsByTagName("A"); NodeList nodeListB = element.getElementsByTagName("B"); [/code] Can I assume the elements are in … | |
hey guys, im having problem converting this to a while loop. int lineB; int starB; for(lineB=1; lineB<=10;lineB++) { for(starB=10; starB>=lineB; starB--) System.out.print("*"); System.out.println(); } System.out.println(); Can it be written like this? int lineB=1; int starB=1; while(lineB<=10) { while(starB>=lineB) { StarB--; System.out.print("*"); System.out.println(); } lineB++; } | |
Hi, I downloaded the open source project Guitar Tuner ([url]http://sourceforge.net/projects/guitartuner/[/url]) Inside it there is an index.html file, a TunerApplet.jar file and a TunerApplet.java file (As well as some images and GPL etc.) When i open index.html the applet displays as it should however if I try to recompile (Even without … | |
I am doing a homework problem and am having a hard time understanding exactly how I should be doing this. Any nudge in the right direction would be helpful. :) The problem is as follows: Ship, CruiseShip, and CargoShip Classes Design a Ship class that the following members: • A … | |
Hello daniweb, I am new to java and am trying to wrap my head around parsing XML with Java. I've decided to try DOM with Xerces to start because it seems pretty simple, however I am getting NoClassDefFound errors. I'm sure it's something really simple that I have overlooked due … |
The End.