36,051 Topics

Member Avatar for
Member Avatar for rakibtg

in java jframe swing how i can use system default scrollbar style? eg. the default style looks like [this](http://i.imgur.com/3wrBufN.png).

Member Avatar for JamesCherrill
0
167
Member Avatar for rayan22

double sum = 0; double d; for (d = 0; d < 10; d = d + 0.1 ) { sum = sum + d; } The program has a syntax error because the semicolons in the for loop are in the wrong place. The program has a syntax error …

Member Avatar for Priyanka_9
0
233
Member Avatar for divinity02

I have one question, when you want to add a game round in a java game, how do you do it, do you use the round().method or do you simply put (round++) + 1?

Member Avatar for JamesCherrill
0
373
Member Avatar for moaz.amin.37

hello!I install tomcat server and set CLASSPATH variable `servlet-api` and my servlets running properly but when i compile and run my old program program of `java 2 SE` then it compile successfully but not run it prints an error message G:\Java>javac BinarySearchDemo.java G:\Java>java BinarySearchDemo Error: Could not find or load …

Member Avatar for JamesCherrill
0
233
Member Avatar for Shawn_5

Scanner input = new Scanner(System.in); String secretWord ; String guess, dash = "-", upWord; int numGuesses = 0; int numWord; final String SENTINEL = "!"; System.out.println("Player 2, please look away. Player 1, please enter the secter word: \n"); secretWord = input.next().toUpperCase().trim(); numWord = secretWord.length(); for(int dashNum = 1; dashNum < …

Member Avatar for cool_zephyr
0
150
Member Avatar for My_1

Hello, I have problem with jbotton. I have botton decalre it. but how do i access it ? because I have 10X10 or 100 botton. let i want to access 95 botton how can i do that? how do i set the title? here is code import java.awt.*; import javax.swing.*; …

Member Avatar for JamesCherrill
0
329
Member Avatar for nitin1

I have learnt basic android in the last month. I have learnt about fragments, listview, adapters, acitivties, intents, content providers, databases, animations. I want some basic apps' ideas in which I can implement these things and can improve my learning? I am not too good in Java also. I know …

Member Avatar for Slavi
0
132
Member Avatar for jeram.burbon

I am trying to output how many students were processed, how many of the students had a February 29th birth date and the birthdate of the oldest student. I figured out how to output the first two except how to output the oldest student. is the ckOldestBirthDate and updateoldestBirthDate in …

Member Avatar for stultuske
0
534
Member Avatar for infiniteloop56

Hi guys, I have some what of a quick/dumb question. How would one traverse a binary search tree using a loop instead of recursion (An algorithm would be vwry useful if possible)? I appreciate any help . Thanks

Member Avatar for JamesCherrill
0
5K
Member Avatar for mc3330418

I'm trying to update an input value using jquery and I can't get it to do anything. I've tried .val(), .attr, .html, .text. $('#acctnum').click(function(){ var index = this.selectedIndex; var bal1 = $('#bal1').val(); var bal2 = $('#bal2').val(); var bal3 = $('#bal3').val(); var bal4 = $('#bal4').val(); if (index == 0){ $('#poamnt').val(bal1); alert …

Member Avatar for cool_zephyr
0
165
Member Avatar for Leo_5

How to rollback the transaction while spring controller has runtime exception... i found some snippet from google i.e, @Transactional(rollBackFor = Exception.class) I think this only applicable for service class has the exception. I need to rollback controller class has any exception. forexample @controller public class test1 { public void testing() …

Member Avatar for cool_zephyr
0
805
Member Avatar for anubhavat

Hi, i want to submit list of object of selectted check box and want to receive same object in controller from jsp. Jsp Code-><form name="multiCheckBox" method="post" action="multiCheckbox.html"> <table> <th>Below are the list of items with status</th> </tr> <tr> <td>Select</td> <td>Print Strip</td> <td>Planogram DB Key</td> <td>Planogram Name</td> <td>Planogram Description</td> <td>Status</td> <td>Print …

Member Avatar for anubhavat
0
204
Member Avatar for vivekH

Apply undo,redo operations on string pool. please friends help me to get its answer.

Member Avatar for janissantony
0
139
Member Avatar for polar2323

I'm pretty new to Java and I'm taking a class where I need to program an 8-Puzzle Problem in Java. I would love to be able to program it Java in Processing so that I could see the movment of the blocks. I'm generally a vidual learner.

Member Avatar for Taywin
0
199
Member Avatar for redtribal23

I am trying to read a line of numbers in string datatype then parse them into double before reading the next line. I get a nullpointerexception. I am trying to read numbers 4 5 2 first, parse them to double, then do some other calculations before going to the second …

Member Avatar for Taywin
0
194
Member Avatar for Renuka_1

We are hosting the Olympic games. Write a program that will track all the details of this hosting. 1. The program should track the countries and their players along with the games that they are participating in. 2. It will track the medal winners for each game. 3. The program …

Member Avatar for stultuske
-1
163
Member Avatar for GoneGirl

Hi guys, After 10 days of googling and trying I finally must ask. This is not an assignment for school but its a practise one for the upcoming assignment in a few weeks. So i have the weights of 200 oranges in a csv file. With this csv file i …

Member Avatar for GoneGirl
0
2K
Member Avatar for steph7

Hello, so I'm a student and in one of my projects I have to capture the image of a client from a WebCamp and then save it on the database. Now, I'm having some problems and doubts. I've found some videos where they use the library JMF (Java Media Framework), …

Member Avatar for JamesCherrill
1
1K
Member Avatar for shailesh.bhokare
Member Avatar for My_1

How do you via for loop to get the number? I know how the for work. for (int i = 0; i < 256; i++) { System.out.print (i) //That will print out 0 to 255 } how do you read by as byte while (read is not end) { // …

Member Avatar for JamesCherrill
0
77
Member Avatar for Saleem_3

I am looking for Java Webservice Framework that support creation of SOAP as well as REST webservices. I know Apache CXF supports both. Could someone Please suggest more frameworks supporting creation of both type of webservices.

Member Avatar for janissantony
0
83
Member Avatar for N S K

hello friends i am trying to do an virus scanning file(antivirus)..i have spent more times but i cant please any one give me the sample source code i can modify it..i also tried CLAMAV but it is not used for me. thanks in advance...

Member Avatar for janissantony
0
115
Member Avatar for Om Omer

find the distance between two numbers(source and distination)in an array.the array size must be more than 5 and less than 10.

Member Avatar for janissantony
-1
107
Member Avatar for NagaSwarupa

As we observe during online ticket reservation we will enter passenger details in textfields in a table. how values will be fetched from that Jsp page to action class?

Member Avatar for janissantony
0
101
Member Avatar for amita_1

how can I sent value to JSP by javascript? I want to sent latitude and longitude parameters to JSP <body> <button onclick="getLocation()">click</button> <script> function getLocation() { if (navigator.geolocation) navigator.geolocation.getCurrentPosition(displayLocation); else alert("Oops, no geolocation support"); } function displayLocation(position) { var latitude = position.coords.latitude; // ดึงเอาค่า lat var longitude = position.coords.longitude; // …

Member Avatar for janissantony
0
154
Member Avatar for nataraja833

I've have a String String s = " ~ ( A || B ) && C "; A B C can take 0,1,x they follow Boolean Arithmetic w.r.t 'x' Boolean Arith is as follows 0 || x = x 1 || x = 1 x || x =1 x && …

Member Avatar for Taywin
0
350
Member Avatar for mwenyenia07

Hi . I am new to java. I am implementing a functionality where by a user fills some textFields and the data is added as a new row in a Jtable.The table will hold more than one row before saving. I created the table using netbeans Swing controls. its variable …

Member Avatar for JamesCherrill
0
183
Member Avatar for My_1

Hello, I have to subtacke index to number of file that reading in. and then find if there is having a space and counting how many space that have. But my code never excute the if statement. here is code for (int index = -128; index < 128 ; index …

Member Avatar for OldOne
0
123
Member Avatar for Kapeesh

Hello Dear, Plz tell me how to create a bar chart fetch data from database using in jsp. this is my connection code and plz tell me i add new code in same page or another page. Thanks <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Customer …

Member Avatar for janissantony
0
188
Member Avatar for ankit1122
Member Avatar for janissantony
0
100
Member Avatar for PcTechnical1

first class GUI - basically trying to use my stack calculation class to use in my first class GUI in my enter postfix expression actionPerformed area? What is the best step to add my stack calculation to evaluate an expression? import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.util.LinkedList; …

Member Avatar for gusano79
0
201
Member Avatar for COKEDUDE

I was looking at these two examples and I was curious what the difference is between JCheckBox and JCheckBoxMenuItem. http://www.macs.hw.ac.uk/cs/java-swing-guidebook/?name=JMenuBar&page=3 https://docs.oracle.com/javase/tutorial/displayCode.html?code=https://docs.oracle.com/javase/tutorial/uiswing/examples/components/CheckBoxDemoProject/src/components/CheckBoxDemo.java These pictures make it look they are the same except JCheckBox is not in a menu but it is easy to add to a menu with the menu_name.add(menu_item) command. …

Member Avatar for mKorbel
0
357
Member Avatar for EarhawkPH

Hi! Newbie on Java. I'm doing this assignment for a cash register program. Our professor just explained what we're gonna do and stuff. Here's what i understood: 1.)Sales report (my code appears on the first diag box) Product ID Product Name Quantity Price 2 Stuff 100 3 Stuff 100 4 …

Member Avatar for stultuske
0
364
Member Avatar for ali11

import java.util.ArrayList; import javax.swing.JOptionPane; public class ClientList { private ArrayList<Client> clientData; private final String NEW_LINE = "\n"; private int cursor; //manager mode public ClientList ( ) { clientData = new ArrayList<Client> ( ); buildClientList ( ); if (clientData.size ( ) != 0) cursor = 0; //not empty, place cursor at …

Member Avatar for Slavi
0
182
Member Avatar for chubbyy.putto

I try to it. it still have junk char on it. The thing I try to do is decrypt byte key that w/o using the key. When i test is show me a junk when this code is detele any char that over the 0 to 127 but it not …

Member Avatar for Slavi
0
292
Member Avatar for COKEDUDE

I am having issue with jmenu popup in netbeans. It only sometimes works. Sometimes I don't get a java popup at all. Sometimes my File and Edit options are completely missing. This is what my code looks like. import javax.swing.*; public class menu { /** * @param args the command …

Member Avatar for Slavi
0
125
Member Avatar for gedas

hey, i am creating a web service but the problem is when i try to deploy that web service it gives me error below: [ICODE]init: deps-module-jar: deps-ear-jar: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: compile: compile-jsps: Building jar: D:\Documents\NetBeansProjects\EmployeeWebService\dist\EmployeeWebService.war D:\Documents\NetBeansProjects\EmployeeWebService\nbproject\build-impl.xml:684: Deployment error: Starting of server GlassFish Server 3 is not supported. Please, start the …

Member Avatar for ajithoop
0
158
Member Avatar for divinity02

it me again. I am trying to write a java multiplication one players table math game/program and I am stuck on level one. the games has sex levels. level 2 says that for each difficulty level it has to have the specified number of rounds and it should request a …

Member Avatar for JamesCherrill
0
153
Member Avatar for N S K

help me to solve this . how to compare virus signature with file to detect virus in java? whether file content or file signature is compared for virus scanning?

Member Avatar for stultuske
0
209
Member Avatar for glenak

I went to the official JAVA forum, but either those guys there have no clue how to solve this or there's no solution to it, in which case, Java applets are useless and java should stop pimping it. I have to say, this is the most frustrated I've been at …

Member Avatar for lilly13
0
1K
Member Avatar for blankspace

public void pencil1() { k1=2; setDoubleBuffered(false); cursorchange(); addMouseListener(new MouseAdapter(){ public void mousePressed(MouseEvent e){ oldX = e.getX(); oldY = e.getY(); } }); //if the mouse is pressed it sets the oldX & oldY //coordinates as the mouses x & y coordinates addMouseMotionListener(new MouseMotionAdapter(){ public void mouseDragged(MouseEvent e){ currentX = e.getX(); currentY …

Member Avatar for stultuske
0
188
Member Avatar for shaik sajida
Member Avatar for JamesCherrill
-1
57
Member Avatar for N S K

in the signature based scanning I couldn't understand how to find virus when it is in the body of the file..do i need to compare file content with virus signature for detecting virus ? if so how to compare in java? or else how can i compare file with virus …

Member Avatar for N S K
0
126
Member Avatar for cyaeger

i am very new to Java (1st semester). The assignment is to return the location of the largest element in a 2-diamensional array by using this method <public static int[] locatelargest(double[][] a). I have worked on this program for almost a week and have eliminated all but the following two …

Member Avatar for cyaeger
0
884
Member Avatar for Siegit

hallo masters, i want to ask about jasper report, i have an app that need to print out excel output in two columns,but the print out is like attachment, how to create two columns with sorting numbered?

0
54
Member Avatar for jeram.burbon

Im try to write a program but i keep getting this error here is the program program: input: 3-digit ID & birth date (3 int month, day, year) validate birth date (1900's; dont worry about leap year) last student ID: 000 output: ID & birth date for each student birth …

Member Avatar for stultuske
0
1K
Member Avatar for Atlanta15Braves

I have a program that creates a right triangle from a loop reading "*". I have used the code to complete the first part, but the second part calls for a manipulation to take the current pattern, flip it upside down, and then add it to the first pattern. Here …

Member Avatar for stultuske
0
3K
Member Avatar for blankspace

Hello, I need help with java. I need to create an application that is similar with paint but slightly different. Here is the description of this project that i need to work on. First, we need to display a menu that is consist of two choices which is 'custom animation' …

Member Avatar for blankspace
0
199
Member Avatar for piovertwo

This is for a senior-year project with an [ANFIS](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=256541) (adaptive neuro-fuzzy inference system) module to be used as a predictor for financial instruments. The bulk of the system will be written in Python—chosen for its ease of use and the presence of libraries for genetic programming, another component of the …

Member Avatar for Gribouillis
0
3K
Member Avatar for Tycellent

Hey Guys, Really want to learn Java and hope you guys could recommended some Beginner, Intermediate and Expert books/resources (e.g. websites) As of this moment i'm thinking of... Beginner: Java for Dummies, Thinking in Java Intermediate: Effective Java Expert: In addition, it'd be also be awesome if any recommendations of …

Member Avatar for Tycellent
0
181

The End.