Swing JLayer doesn't handle my AWTEvent
Java Programming Forums
by javaenjoyer
3d ago
I working on an assignment. My Swing application should display errors that may occur as a pop-up (not a separate new window, by a smooth pop-up). I wanted to use JLayer eventDispatched() method for that. I have created my Code java: package event; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ErrorEvent extends ActionEvent{ public static final long ERROR_MASK = MouseEvent.MOUSE_EVENT_MASK; public static final int ID = 2006; public ErrorEvent(Object source) { super(source, ID, "errorCommand ..read more
Visit website
Hi
Java Programming Forums
by javaenjoyer
3d ago
Hello everyone, I have an issue I posted in "What's wrong with my code" section ..read more
Visit website
Read a text file and generate a valid Sudoku
Java Programming Forums
by FelTheEcon
3d ago
Hi, I want to create a script in java that allows you to read a .text file that contains 81 numbers where each number contains 3 digits, the first digit is the row number, the second digit is the column number and the third digit is the value. I want to store these 81 values ​​in an array and check if it's a valid sudoku game. This is what the text file contains : 001 012 023 034 045 056 067 078 089 102 113 124 135 146 157 168 179 181 203 214 225 236 247 258 269 271 282 304 315 326 337 348 359 361 372 383 405 416 427 438 449 451 462 473 484 506 517 528 539 541 552 563 574 585 607 618 629 63 ..read more
Visit website
Obect orientation
Java Programming Forums
by Battycatter
3d ago
We all know there is a division of opinion about how soon you introduce object‑orientation when teaching Java® programming. [It isn't a problem if you learn C.] Which side of the controversy would you come down on ..read more
Visit website
[SOLVED] Java Swing Application with DB, last few errors
Java Programming Forums
by razukashii
6d ago
a Moviehouse app that allows the user to register a customer and reserve a room for them yes this is for a codechum activity, I've spent a whole day trying to fix these last few errors but i don't think my skill and knowledge is good enough for it so im asking here for advice, im now at 9/10 points for the activity, good enough but it annoys my ocd document here: https://docs.google.com/document/d/1...it?usp=sharing problems at end of docu ..read more
Visit website
Logical Error in Multi-Cell Combinational CSV File Analytics Java Program
Java Programming Forums
by bdts
6d ago
I'm working on a Java program to track bonus (free) products given to customers. The problem occurs when a campaign with minimum quantity requirements is satisfied for the first product but not the second one. The campaign should not be valid for the first product sale either, but the code fails to cut the bonuses correctly in this specific scenario. The relevant parts of my code are below. This is the code so far (***I strongly suspect either the compareSalesWithCampaigns() or the getCampaignBonus() method is the culprit*** for minimal reproducible example purposes): ``` package mf_app.Bonu ..read more
Visit website
Making progress
Java Programming Forums
by Helium c2
6d ago
I'm getting better at Java programming. Because I write down all codes in a small note pad binder. Cheap binder. I use it to review all the programs and that really is a good idea and thing to do. Now that I've gotten a bit better, I'm looking into other areas of website building. I'm thinking about python programming language. Started in 1991. This python looks very much familiar and easy to learn. I picked it up just by reading the first few programs in python. So I'll be switching back and forth. I hope this works out. Java and python programming to get to my objective. Websites and network ..read more
Visit website
Questions about integer Overflow in Objects
Java Programming Forums
by Rogerm
1w ago
Hello everybody. I'm having some problems understanding Overflow. I was solving the following exercise: Use the Rational class with long values) Write a program that computes the following summation series using the Rational class: 1/2 + 2/3 + 3/4 + ... + 98/99 + 99/100 You will discover that the output is incorrect because of integer overflow (too large). To fix this problem, see Programming Exercise 13.15 (Rational Class using BigIntegers) First of all, when I run the program it produces integer overflow. Also, the program is very slow to complete the task. It takes 3 minutes a ..read more
Visit website
Simplest way to do an F&F HTTP request
Java Programming Forums
by ch.destr
1w ago
Hello everybody, From the JVM (Java 8) point of view, what is in your mind the resource-cleanest way to do an asynchronous HTTP request that doesn't need to treat a response? What I actually do is: - I use a cachedThreadPool that quietly lives in a singleton bean - Every time I need to send a request, I create a new thread (with executor.submit), I create an HttpPost (from org.apache.http.client) and I execute the post on a ClosableHttpClient inside a try(...){} - At the end in the same thread I do EntityUtils.consume on the eventual response Is there any simpler and cleaner way to do it o ..read more
Visit website
Kafka exception
Java Programming Forums
by Muniprasad
2w ago
org.apache.camel.FailedToCreateRouteException: Failed to create route direct://poisonQueue at: >>> To[poisonRequestQueue] <<< in route: Route(direct://poisonQueue)[From[direct://poisonQueue] -> [p... because of No endpoint could be found for: poisonRequestQueue, please check your classpath contains the needed Camel component jar. i have added camel-core,direct,component .jar in my pom.xml but still facing tis exception can any suggest how to resolve ..read more
Visit website

Follow Java Programming Forums on FeedSpot

Continue with Google
Continue with Apple
OR