35,618 Topics

Member Avatar for
Member Avatar for xchris

Hello I'm new to programming and I'm trying to make a java application that will "hear" (not record necessarily) the sound and display how loud is.I'm thinking of converting the sound recordings to numbers,so I can see the difference on the sound levels.I got this code and I added the …

Member Avatar for xchris
0
1K
Member Avatar for joelanandraj

hi all i have created a jsp page for online exam here i have created a database to store all the question and answers ,used the database to fill all the radio button values,but whenever i retrieve the radio button value and compare it with the database value it is …

Member Avatar for joelanandraj
0
230
Member Avatar for hajjo

I have following questions, can someone tell me if i answered correctly Can we configure portlet wiring for two portlets mapped on two different pages? no Custom Validators in JSF will be executed during the Render phase, is it correct? yes SOAPUI is specialized in optimizing the web services message …

Member Avatar for stultuske
0
143
Member Avatar for swati1706

hello everyone.. im trying to insert date into mysql..the field is of date type bt when i select a date from datepicker and insert it into database,it takes a random date..not getting where the problem is.. the code is as follow SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); java.sql.Date d = null; …

Member Avatar for pritaeas
0
250
Member Avatar for Helpmeplease123

How do you add a membership records in java(bluej) First Name, Last Name, phone number. Please can you help me

Member Avatar for ObSys
0
254
Member Avatar for migu2990

Hi, I was asked to make a Phone Book thats saves entries and call them up. Then the teacher added a new task. The Program should delete entries. He gave us a methode and said we are not allowed to use ArrayList or Hashmaps, ONLY Arrays. I tried alot but …

Member Avatar for migu2990
0
409
Member Avatar for Benjamin_4

Hello guys i want to know if its possible to format a text as it is done ms-word on a jframe? i want to be able to edit the text i put on my jframe by specifying the heading, making some texts bold, adding font color to som texts and …

Member Avatar for JamesCherrill
0
98
Member Avatar for <M/>

Okay, last question of the night. My program is to have a program collect a number, double it, and reverse. I am having problems with reversing it... Here is my code: import java.util.Scanner; import java.text.DecimalFormat; public class ReverseNumber { public static void main(String[] args) { Scanner s = new Scanner(System.in); …

Member Avatar for kal_crazy
0
172
Member Avatar for Violet_82

hi guys, I wonder if anybody can clarify something for me. Take these 2 fragments of code (2 constructors belonging to 2 different applications): First one: public MouseTrackerFrame() { super( "Demonstrating Mouse Events" ); mousePanel = new JPanel(); // create panel mousePanel.setBackground( Color.WHITE ); // set background color add( mousePanel, …

Member Avatar for Violet_82
0
484
Member Avatar for nikolaos

Testing the following code from a book public class RunTime { public static void main(String[] args) { Runtime r = Runtime.getRuntime(); //MEMORY MANAGEMENT long mem1, mem2; Integer intmatrix[] = new Integer[1000]; System.out.println("Total memory is :" + r.totalMemory()); mem1 = r.freeMemory(); System.out.println("Initial free memory is :" + mem1); r.gc(); mem1 = …

Member Avatar for mKorbel
0
776
Member Avatar for Ramendra kumar

problem: that is not successful login when we enter email and pass but process going to sorry email id or password error %@page import="bean.LoginDao"%> <%@page import="bean.LoginBean"%> <%@page import="bean.ConnectionProvider1"%> <%@page import="bean.ConnectionProvider"%> <jsp:useBean id="obj" class="bean.LoginBean"/> <jsp:setProperty property="*" name="obj"/> <% boolean status=LoginDao.validate(obj); if(status) { session.setAttribute("session", true); out.println("You r successfully logged in"); } else …

Member Avatar for stultuske
0
148
Member Avatar for <M/>

Okay, so this is a similar error to the code before. So I created this: import java.util.Scanner; public class IntegerCount { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer, the input ends if it is 0: "); int num = input.nextInt(); if (num == …

Member Avatar for <M/>
0
334
Member Avatar for <M/>

On my code, it says that there are 2 mistakes and I can't fix them. Here is my code: import java.util.Scanner; public class Exercise4_1M { public static void main(String[] args) { int countPositive = 0; int countNegative = 0; int count = 0; int total = 0; Scanner input = …

Member Avatar for <M/>
0
446
Member Avatar for tbuchli

// Create the cboSelectGroup, and add it to the navigation panel: //String[] strDefaults = {"Defaults"}; //cboSelectGroup = new JComboBox(strDefaults);Public Class Form1 cboSelectGroup.setPreferredSize(new Dimension(150, 40)); cboSelectGroup.setMinimumSize(new Dimension(150, 40)); cboSelectGroup.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnImagesActionPerformed(evt); } });

Member Avatar for tbuchli
0
286
Member Avatar for <M/>

Hi guys, I am working on an assignment for a class of mine (Java) and I am really frustrated with it. This was my very last attempt (out of like 20)... System.out.print( "Enter temperature in Celsius to convert to Fahrenheit: " ); double c = kbinput.nextInt(); double f = ( …

Member Avatar for <M/>
0
227
Member Avatar for Pratique
Member Avatar for bluedonutblueyedangel

I'm currently working on a homework assignment in one of my classes, and I'm having some trouble with it. I am supposed to make a multithreaded messaging program that allows users to connect using both TCP and UDP. The messaging program works perfectly when TCP is selected. However, I do …

Member Avatar for nandosss
0
336
Member Avatar for thorin

hi, everyone I am a Java newbie. I have followed a bunch of tutorials and examples from the web but they all failed miserably at teaching me how to properly apply this library: com.google.gson. First how do I receive properly in the java servlet a json request that has been …

Member Avatar for peter_budo
0
499
Member Avatar for daniel_14

Hello Everyone, I am having trouble getting a display of my program on the JTextArea "DisplayWindow". My code works and compiles but i do not know how to transfer the program to run on the GUI. It is really simple and I just want it to display and accept the …

Member Avatar for JamesCherrill
0
204
Member Avatar for albedini

I'm new and trying to draw a table type where I can place scores inside like 5; A B C 1 5//this is where it all falls apart 2 3 I have this so far but not working; public class Table3 { static int[][] list = new int[4][4]; //private char …

Member Avatar for JamesCherrill
0
263
Member Avatar for SMYussef

Dear all, I have a program to code which would take several lines of input from user (a fruit name, it's price per kg and the number of kgs sold). Each seperated by a space. It would then output the total money made and the name of the fruit that …

Member Avatar for stultuske
0
104
Member Avatar for Pobunjenik

I've got a JTable called chances_T full of doubles ranging from 0 to 100. I'm trying to set the background color of each cell based on the cell's value. So I built a custom cell renderer: class CustomRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, …

Member Avatar for mKorbel
0
458
Member Avatar for <M/>

I am trying to cut the decimal off the output of this small code: import java.util.Scanner; public class Distance { public static void main(String[] args) { java.util.Scanner in = new java.util.Scanner( System.in ); double x1 = in.nextDouble(); double y1 = in.nextDouble(); double x2 = in.nextDouble(); double y2 = in.nextDouble(); double …

Member Avatar for old_apache
0
4K
Member Avatar for Derek_4

I am trying to set the boolean newEnergy to true only when the item is found. However, it is true at the beginning of the game and remains true until the command 'use' is used. Is there anyway to set newEnergy = true only when the item is found or …

Member Avatar for JamesCherrill
0
114
Member Avatar for Zubi0777

public void printmembersdetails() { System.out.printin(member.FirstName = firstname); System.out.printin(member.LastName = lastname); System.out.printin(member.IDNumber = IDnumber); System.out.printin(members.PhoneNumber = PhoneNumber); } System.out.printin(member.FirstName = firstname); System.out.printin(member.LastName = lastname); System.out.printin(member.IDNumber = IDnumber); System.out.printin(members.PhoneNumber = PhoneNumber); } is this right

Member Avatar for JamesCherrill
0
127
Member Avatar for StephenopolousINC

Hello I am trying to create a class that called Lootable and create subclasses such as trunk, locker, etc. that will contain items that can be looted, they will inherit their lootability from the Lootable class. I am thinking of using the ArrayList for this. I have thought of different …

Member Avatar for StephenopolousINC
0
927
Member Avatar for dre-logics

I have created an ASP.NET application in vb.net Use a Ubuntu 13.10 Server with Apache Tomcat No i want deploy (install) this application on this server. Is this possible? If so, how? What are the consequences? Thanks, Andre

Member Avatar for pritaeas
0
208
Member Avatar for sk8ergirl

I've been trying to do this for the past two hours I have object of type PersonTest I managed to save the data ,but I'm not sure if it correct or not becouse I still can't read the file. I want to read and write using java Object Stream this …

Member Avatar for JamesCherrill
0
238
Member Avatar for Thirumuruganp
Member Avatar for sk8ergirl

I'm trying to creat simple seating for movie I have the seats as buttons when the user click btnOne then the background change to red if the user click the button again it will chnage to gray I've managed to change the color to red when it clicked using actionpreformed …

Member Avatar for softswing
0
121

The End.