32,204 Topics

Member Avatar for
Member Avatar for scheppy

Guys, Im wondering, If I have another class with a jpanel in it... and I add this to the jPanel, this should work correct? jpanel.add(new DoughOverviewList()); jpanel.repaint(); for some reason its not showing in my jpanel, /* * To change this license header, choose License Headers in Project Properties. * …

Member Avatar for scheppy
0
405
Member Avatar for scheppy

Hey Guys, So I have a JTextfield in the cells of 1 of the columns in my JTable I want to allow only numbers and up to one dot/period. Doesant need to contain a period. The persiod can be anywhere except at the end of the number. 1 ok .1 …

Member Avatar for JamesCherrill
0
770
Member Avatar for Phantess

I'm trying to get a pop up as soon as a user logs in. I already have the pop up, but it keeps popping up all the results one at a time when I only need it to pop up within 15 minutes before the appointment time. How can I …

Member Avatar for JamesCherrill
0
451
Member Avatar for Phantess

I am trying to display this SQL query in a table. String query = "SELECT COUNT(`appointmentId`),EXTRACT(MONTH FROM `start`) FROM `appointment` WHERE YEAR(start) = '" + year + "' GROUP BY EXTRACT(MONTH FROM `start`)"; Unfortunately I cannot alter the database. I am trying to list the total appointments per month on …

Member Avatar for Phantess
0
1K
Member Avatar for WDrago

All, For the life of me I cannot get this program to compile. The error message "error: non-static variable this cannot be referenced from a static context" occurs on lines 23 and 24. Here is the entire program: [CODE]public class ThreadTest { public static int x = 0; public class …

Member Avatar for JamesCherrill
0
28K
Member Avatar for scheppy

Hi Guys, I ussually dont post anything here often, just get everything off of everyone elses questions, but I'm having a strange problem that im scratching my head over, I have a JTable where I can Add and remove rows... This is just for testing purposes, I'm about to make …

Member Avatar for scheppy
0
748
Member Avatar for DAVID_135

I want the method to append a new person object according to the form each time the save button is clicked, and read the new content of the file each time the retrieve button is clicked, unfortunately it only reads the last entered person. am now here for help package …

Member Avatar for JamesCherrill
0
577
Member Avatar for thomas_43

Hi, I am trying to move from a Xrm.Page code to pulling from a library. I want a notifiction whenever the field value is tagged as needing to be notified. right now the code that works is.... var message = "This person needs to be notified"; function SetANotification() { if …

Member Avatar for thomas_43
0
266
Member Avatar for John_165

Hey guys, I have a little bit confused on below code and output **Main ** public class Main { public static void main(String[] args) { ClassA classA = new ClassA(); System.out.println("====== Before ====="); classA.checking(); System.out.println("===== After ====="); classA.checking(); } } ** Class A** public class ClassA { boolean b = …

Member Avatar for Buy Business
0
580
Member Avatar for prnjn

Hi , For my major project i have 7 months in hand. I have decided to make a video chatting application using java (like yahoo messenger or skype) with features , 1. Authentication of user name and password before logging in 2. one to one online video chatting . 3. …

Member Avatar for JamesCherrill
0
8K
Member Avatar for Mr.M

I have a code that picks contacts, the problem is that if a user pick a contact or choose a contact that was not saved on a phone but was saved on google contacts (This is a way many people now save their contacts so that should their phones are …

Member Avatar for rproffitt
0
932
Member Avatar for subhankar02dey

I want to send an ArrayList<Integer> from client and and then read it from server using socket program and after readinf it at server, I want to calculate the sum of the elements of the ArrayList and then return the average to client. I have written the code as follows …

Member Avatar for AyOob_1
0
8K
Member Avatar for ArunRaj.SRM

Hi, I'm new to JSP. I want a sample code to call a java class on button click in jsp.

Member Avatar for maheen_1
0
3K
Member Avatar for Nightocoder201

Hello everyone, I am having trouble with my program its solving expressions and when I compile it I get a "Illegal start of expresson" line in my output. I am using Jgrasp as my softwear. May I ask to reveiw my code and see on what I did wrong? I …

Member Avatar for JamesCherrill
1
2K
Member Avatar for Rashmi_4

I am working on a java program that will read a text file containing integers separated by '@', in the format @123..90@123..90@ vertically aligned in the file. After reading, it outputs those numbers in a grid format. I want to get this output on a separate AWT window. As I …

Member Avatar for JamesCherrill
0
235
Member Avatar for Saboor880

I have to print some text to printer. I needed to translate that text in Urdu language also. For that I used google translation API and all was set. But I am facing problem in order of output. // this is the code which is giving my desired output String …

Member Avatar for JamesCherrill
0
440
Member Avatar for scheppy

Guys, Ive gotten it into my head to do somthing fairly difficult for me, I want to communicate with a swing application, to a proximetly sensor, and track live when it senses somthing and how many times it has sensed somthing, I want to use java. theres alot more to …

Member Avatar for rproffitt
0
430
Member Avatar for cereal

Hello, I hope not to scare you with this long post. I'm testing [Solr](https://lucene.apache.org/solr/) (read solar) and it works fine. I have an issue with the **DataImport** handler, it's set to get data from a MariaDB database, which works fine if I save the database credentials in plain text in …

Member Avatar for tesseract1919
0
2K
Member Avatar for ZheeYT

I am very new at programming in Java. Could somebody help me out with programming a Tic Tac Toe game? I would love to have to have the code for a game that can be played against the CPU. The assignment is to write the tic tac toe game using …

Member Avatar for Reverend Jim
0
2K
Member Avatar for Leah_1

Take a closer look at some common misconceptions that prevent hiring managers from even considering a DevOps consultant. Great Article "https://medium.com/prodopsio/devops-consultant-vs-devops-employee-69fd011455fe" --> https://medium.com/prodopsio/devops-consultant-vs-devops-employee-69fd011455fe

Member Avatar for rproffitt
0
270
Member Avatar for Prosatanos

This is a function in class *DepartmentBean* which check if element already exist in container: bool f; public void addIfAbsent(UserBean userBean) { if (users.stream().anyMatch(x -> x.getUsername().equals(userBean.getUsername()))) { f = false; } else { f = true; users.add(userBean); } } } In my servlet I am trying to send Message of …

Member Avatar for Tarek_2
0
473
Member Avatar for Krisrei

Hey guys! help me out, i'm really out of ideas, how can i save the datas i inputed to have a rotation of value , like the computation in the withdraw, when i 1st use the withdraw or deposit, it computes, yes but when the 2nd time i use it, …

Member Avatar for Reverend Jim
0
393
Member Avatar for javaprog200

Hello Members, I have a basic java question about non-terminating float values: public class FloatandDouble { public static void main(String args[]){ float a = 1.0f/3.0f; System.out.println (a); System.out.println (b); } } The output of the program is 0.33333334. Why is it not 0.33333333? Thank you

Member Avatar for javaprog200
0
178
Member Avatar for Heung min

import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; public class DataStreamExample { public static void main(String[] args) throws IOException { File f = new File("seminar.txt"); if (f.exists()) { BufferedReader br = new BufferedReader(new FileReader(f)); String dat; StringBuilder text = new StringBuilder(); while ((dat = br.readLine()) != null) { text.append(dat); } …

Member Avatar for JamesCherrill
0
281
Member Avatar for Daniel_84

A ___ is used to document the design of a class. (2 words) Identifying objects, attributes, and behaviors is called _____ . Encapsulation is also called _ _ _ _ _ _ _ _ _. (not data hiding) Which of the following are not allowable modifiers for an outer class? …

Member Avatar for sandy_5
0
300
Member Avatar for lashbandi

HI.. i had started a thread before about the same code...not sure if i was suppose to keep going in the same one or create a new thread..i am sorry if i did anything wrong mods... my program should just ask the user to enter words.. "The program must simply …

Member Avatar for sandy_5
0
12K
Member Avatar for dmanw100

I'm trying to read in from a .txt file with a Scanner (see code). For some reason this line of code will never execute even though it can open the file and there is, in fact, data in it as such: Name Name Number Number [CODE] File playerFile = new …

Member Avatar for JamesCherrill
0
967
Member Avatar for J_5

import java.util.Scanner; public class Rational { private int numerator; private int denominator; public Rational() { numerator = 1; denominator = 2; } public Rational(int numerator, int denominator) { this.numerator = numerator; this.denominator = denominator; } public int getNumerator() { return numerator; } public void setNumerator(int numerator) { this.numerator = numerator; …

Member Avatar for JamesCherrill
0
328
Member Avatar for Violet_82

HI guys, as I was playing with observers today I came across something interesting. I have a program which keeps a list of users (Observers) and products (Observables) and the idea is that whenever the availability (that's a property of a product) changes the Observers are notified of this change. …

Member Avatar for Violet_82
0
1K
Member Avatar for Violet_82

hi guys, I've come across observers while working ona very very large project, and I didn't quite understand how they were structured and I suppose this had something to do with the huge size of the project itself. Anyway, I then decided to delve a little more into that, I …

Member Avatar for JamesCherrill
0
356

The End.