36,051 Topics
![]() | |
i have to print this ******** *** *** ** ** * * ** ** *** *** ******** my code is [code=JAVA] class one { public static void main(String args[]) { String s1="*";int i,j; for(i=4;i>0;i--) { for(j=0;j<i;j++) { System.out.print(s1); } for(int k=0;k<8;k=k+2) { for(int m=0;m<k;m++) System.out.print(" "); } for(int n=4;n>0;i--) { … | |
i need to a Scroll bar or JScrollPane to My Jtree... I have googled and gone through several examples, but non seemed to have worked... Please can some one help me to solve this problem .. I simply need to have scrollers when the content of the JTree increases .. … | |
I know this contains actionscript, but the server side is Java. I am trying to get a red5 server to insert into mysql, but I can't get eclipse to compile this client side code. Could someone tell me if this tutorial is up to date with galileo, the new version … | |
Suppose if I want to save an object to a database I would: 1. Create a POJO and set the values captured from the JSP page 2. Parse the POJO to the BSL 3. The BSL will perform the database operation using POJO To set the values of the POJO … | |
i created a dropdown list containing university names e.g. 'oxford' 'cambridge' and so on. I would like the uni selected from the dropdown list to be sent to another page as the heading. I am having trouble doing this myself and I dont want to create a page for every … | |
alright, i have been working on this code for two days. it is an assignment for my ap comp science class. i have tried several experiments that have all not worked. im supposed to make a proram that simulates an 11 sided dice being rolled, and it has to use … | |
Hi I am trying to find out a way to swap two nodes in an unordered linked list. I want to find out a way where i can change the links of the two nodes so they are swapped. I know I am supposed to use the previous and next … | |
hi every1 i am doing my final year project next year and i have decided to do something in java but cant think of it. does any1 have an idea of what to do thanx :) :o :surprised :confused: | |
Hello all, One of my application used following code which is developed in java 1.2.2 but now we are migrating this application to java se 6 where the following code is depracted. sun.misc.HexDumpEncoder.encodeBuffer Can any one guide for the above code replacement in java se 6 Thanks & Regards, | |
Hi i am using netbeans to make a tictactoe game so far this is my code: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TicTacToe implements ActionListener { //Class constants private static final int WINDOW_WIDTH = 400; private static final int WINDOW_HEIGHT = 400; private static final int TEXT_WIDTH = … | |
Hi ive been working for a few days now trying to figure out how to make it so when a button is pressed in this game instead of just a simple X or O showing up an image of lets say a dog for X and a cat for O … | |
Hello everyone. I am new to java and am stuck on a problem i need to complete. The problem asks for me to create a program that calculates daily driving cost. The application needs to have total miles driven, cost per gallon, mpg, parking fees and tolls. Now, my professor … | |
Hello everyone, I am having problems trying to install Java 3D in my laptop. Can anyone help me? | |
I am doing a POST login. To do so I am using a combination of HTTPComponents (Apache) and native Java libraries. [CODE] //send the stuff HttpResponse responder = httpclient.execute(poster); System.out.println(responder.getStatusLine()); //The output of this is always 302 Found String rawdata; //Use Sun's stuff to connect to the account home page … | |
:confused:Hey I just started a programming class and stuck in a section of my assigment. i would like to know if someone could guide me to the right direction. Last instruction: " Write a script that reads an integer and determines and output XHTML text that displays whether it it … | |
Alright I have created an object, its a simple object. Basically just textfields and a combobox. I have them all in a gridbag layout with weightx and weight y set to one so that they fill out the panel I place them on. [B][U]Question 1:[/U][/B] What I'm wanting to do … | |
I recently moved from JDK1.3 to JDK1.5 and find that the display of parameter listings in javadoc output is now hard to read. The lines are too close together. I think this has to do with the fact that the doctype at the top of each HTML page has changed … | |
I need to write a program where it will ask the user to write a sentence and count the upper case and lower case alphabet 'e'. I.E- number of lower case e is say 4 and number of upper case E is 3. Every tree is not an Elm,Emile. and … | |
I need to write a program that create some process by select number from menu. And then, if I select 4, ALL process created by this program will be terminate. So, I'm using processBuilder to create process. The problem is how can I destroy the process? Thank you. Here's is … | |
I am new to JSPs. I would like to know how can I get the database info (drivername, url, username, password etc.) to load from a config file into the JSP rather than hard coding the values there. Thank you everyone in advance. | |
i am new in Jsp please tell me how to connect MySql to JSP ? | |
How to move pointer in display to beginning of line.I don't want to create a new line.I want to take the cursor/pointer to the beginning in same line. I have taken help of all possible combinations of System.out.print statements. For example in the code below i want to print 70 … | |
Hi, I am thinking about something that I heard in a discussion and I am not sure whether it is really like that or not. Calculating a shortest path on a graph can be done either using dijkstra's algorithm , basically DFS or by BFS. There might be some other … | |
hiii i m working in a cross platform video conference application using java media framework but i faced many problems with JMF especially in camera detection since it can detect VFW cameras only and detect default camera when connect more than one except u disable default camera from device manager … | |
hi helpers, i'm trying to read an array from jsp in to java(servlet) page the code is JSP CODE (readingcheck box values): [CODE] String select[] = request.getParameterValues("sel"); if (select != null && select.length != 0) { for (int i = 0; i < select.length; i++) { out.println(select[i]); [/CODE] its working … | |
I have to write a very simplistic password cracker for a Security Class...Basically, the professor gave us a binary file with five encrypted passwords and a list of 354984 possible words. The first part of the assignment was easy, I can crack the 5 passwords in under a second. But … | |
Good evening, all! My current assignment is a small Appointment Book written in Java. It should scroll through the times of the day, and display the appointment (if any) for that particular time of day. I can scroll through the different times with no issue, but I can't seem to … | |
I was trying to run a spring program with different style. I am new to this framework. I tried to load configuration file with types of loader. like [CODE] (1) BeanFactory factory = new XmlBeanFactory(new FileSystemResource("spring.xml")); (2) ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml"); (3) ApplicationContext context = new FileSystemXmlApplicationContext("/spring.xml"); [/CODE] But … | |
Hi, I'm writing my first program for my second year comsci class and I'm still learning java along the way. Anyways, the signature for one of my functions has to be: "public static BigInteger fNumberRoutes( int n, int m )" So I assume it's a function that returns a BigInteger. … | |
ok now what i want out of this program is to be able to ask the user how large the height and width of the drawing should be. (i seem to have this down ok or at least i think i do) i also want to be able to have … | |
Hello, I just need some help in ByteBuffer's put(index, byte) method. Basically I have a byte array which stores data and is put into a ByteBuffer. The problem I'm facing is I want to put extra data in the ByteBuffer in index 2 (The positioning is very important) How would … | |
hi i am new to java programming and im working on a looping program involving the fibonacci numbers. what i would like to do is to have a program that asks the user how many values of the Fibonacci sequence to output. Then i want to create a loop that … | |
I'm using netbeans 6.7.1 and i'm trying to connect to the sql server 2000 database that i have created and i get this error message, SQL Exception: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host pc05801, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an … | |
i m doin something like: editorPane.setPage(urlString); i m using this function for displaying a webpage. now i used hyperlinklistener so when i click on link it goes to pointed url.but i m not able to use other component of the page like Buttons,checkboxes,Submitbutton.Can you explain how to do it? | |
please how do i get java 6 for mac, i have even checked out their site its just 5 thats there any help... | |
Can someone enlighten me on where to begin? I want to learn java along with servers i.e. apache / tomcat. Just point me in the right direction and I'll get right to it. How long will it take for me to learn this stuff? Any info would be greatly appreciated. | |
public class OpenMenuListener implements ActionListener { public void actionPerformed(ActionEvent ev) { if(ev.getSource() == a) { f2 = new JFrame("shashikant verma"); p2 = new JPanel(); f2.getContentPane().add(p2); String str = "<html>"+"<h>"+"<P ALIGN = \"CENTER\">"+"<i>"+"<font size = \"10\">"+"<font color= \"#800080\">"+"CORRECT DEFINITION AND<br>"+"STRUCTURE OF FUNCTION y = f(x) "+"<br>"+"</i>"+"</h>"+"<P ALIGN = \"LEFT\">"+"<font size = … | |
hi all i want to read CSV file how can i do that please help me with a bit of code Thanks Kirti | |
A program that creates a grid panel of desired [FONT="]dimensions [/FONT]and changes the colour randomly of each grid box upon dragging the mouse over the selected region. | |
hiiii, i have to build a secure web application using jsp, for which i have to implement SSL. I have generated the certificate using java keytool but as soon as i edit my server.xml file to enable connector port for https (8443) and add the other attributes like keystore,storepass and … | |
I'm trying to learn some struts through this tutorial: [url]http://www.netbeans.org/kb/docs/web/quickstart-webapps-struts.html[/url] Now I've completed everything but I'm getting this weird error in the browser: [QUOTE]type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page … | |
hello, i need help on the format for rss feed in aptana studio to link to java servlet coded in eclipse. thanks!!! | |
Hi all, I am trying to access login page (html page) from subdirectory of my web directory , the login page calls loginServlet which is reponsible for authintication, then the loginServlet response back to the client a web page to the user(whether user or adminstrator) . my web directory called … | |
Hi, I am trying to divide array elements in low and high using a single for loop. But, I don't know why I am getting ArrayIndexOutOfBoundsException. I tried working it out on paper and it seems correct. Can anyone point out my mistake? Thanks!! [CODE] for(int i=0;i<=n/2;i++) { ALow[i]=A[i]; AHigh[i]=A[i+n/2]; … | |
hi everyone, i'm not on a expert level of java language. however if anyone can help provide a sample code on how to create a simple java game either using java standard edition or micro edition is highly appreciated. thanks. | |
I have a program i have to build for class using the Player class. i need to be able to remove add show and save and i cant seem to get the for loop to work in the methods. and when i tried passing the class player to the methods … | |
Hi everyone, I am a beginner in java. I am still trying to learn the structure and other basic stuff. I am trying to add some code so that the methods in main() work correctly. [code]class Complex { double real, img; void setValues(double i, double x){ real=i; img=x; } public … | |
hello I'm haveing alot of trouble here, i couldnt figure out how to get the pie to reflect my amoritization output using on only 2 slices and I haev to hand in something today so I thought I would jsut color the 4 sections with representative colors. If a person … | |
SOMETHING IS WRONG WITH MY CODE, IT GETS COMPILED BUT ONLY PROBLEM IS WHEN I INPUT THE NUMBERS THE OUTPUT COMES AS "Area@9664a1" ! // Implement a class Area which has three attributes length, breadth and Area. use attributes constructor to initilize length and breath. implement a method calcArea to … | |
Hi, I am trying to implement an applet. The idea is to create the applet, then connect places where I single-click with the mouse with black lines until we give a double-click. With a double-click I should clear the applet. To clear the applet I am trying to set the … |
The End.