32,204 Topics
| |
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. * … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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. … | |
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 … | |
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 … | |
Hi, I'm new to JSP. I want a sample code to call a java class on button click in jsp. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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, … | |
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 | |
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); } … | |
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? … | |
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 … | |
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 … | |
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; … | |
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. … | |
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 … |
The End.