r/JavaProgramming • • Sep 23 '26

(Help) Instance + method call not working in universal timeframe class

2 Upvotes

I am trying to call a class that summons a ball from another class that just works as a centric timeframe.

It doesn't give me any errors upon loading but all I see is the window popping up with a black background, I don't see anything else

Main

Copypackage main;

import javax.swing.JFrame;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.Color;


public class Main {
    public static JFrame windowfight = new JFrame();
    static Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    static int height = screenSize.height / 3;
    public static int uniscale = height * 800 / 600;
    public static void main(String[] args) {
        
        

        windowfight.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        windowfight.setResizable(false);
        windowfight.setTitle("Rissys Ball Dungeon");
        
        windowfight.setLocationRelativeTo(null);
        windowfight.getContentPane().setBackground(new Color(0, 0, 0));
        windowfight.getContentPane().setPreferredSize(new Dimension(uniscale,(int)height));
        windowfight.pack();
        windowfight.setVisible(true);
        
        
        PlayerBall panel = new PlayerBall();
        windowfight.add(panel);
        windowfight.setVisible(true);
        
        panel.setOpaque(false);
    }
    
    
    
}

Playerball

Copypackage main;
import java.util.Random;

import javax.swing.JFrame;
import java.awt.Dimension;
import javax.swing.JPanel;
import java.awt.Graphics;
import java.awt.Toolkit;
import java.awt.Color;


// for collisions: double xDif = x1 - x2;
//double yDif = y1 - y2;
//double distanceSquared = xDif * xDif + yDif * yDif;
//boolean collision = distanceSquared < (radius1 + radius2) * (radius1 + radius2);

public class PlayerBall extends JPanel {
    
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    public double plrsize = PlayerStats.Size;
    public int plrrad = (int)(plrsize * Main.uniscale);
    Random rand = new Random();
    public double dirx = rand.nextBoolean() ? 1 : -1;
    public double diry = rand.nextBoolean() ? 1 : -1;
    public double plrx = 300 * Main.uniscale;
    public double plry = 100 * Main.uniscale;
    

    public void BallLogic() {
        plrx += dirx * PlayerStats.Speed;
        plry += diry * PlayerStats.Speed;
        
        if (plry - plrrad < Border.topborder) {
            System.out.println("Niget");
            do {plry += 1;} while(plry - plrrad < Border.topborder);
            diry = diry * -1;
        }
        if (plry + plrrad > Border.bottomborder) {
            System.out.println("Bitlet");
            do {plry -= 1;} while(plry + plrrad > Border.bottomborder);
            diry = diry * -1;
        }
        
        if (plrx + plrrad > Border.rightborder) {
            System.out.println("Fricet");
            do {plrx -= 1;} while(plrx + plrrad > Border.rightborder);
            dirx = dirx * -1;
        }
        if (plrx - plrrad < Border.leftborder) {
            System.out.println("Jiblet");
            do {plrx += 1;} while(plrx - plrrad < Border.leftborder);
            dirx = dirx * -1;
        }
        
        repaint();

    }
    u/Override
    protected void paintComponent(Graphics g) {
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

        super.paintComponent(g);
        
        g.setColor(Color.WHITE);
        
        g.fillOval((int)(plrx - plrrad), (int)(plry - plrrad), plrrad*2, plrrad*2);
    }


}

Border

Copypackage main;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.border.*;


public class Border {
    private static Dimension window = Main.windowfight.getContentPane().getSize();
    public static int topborder = 0;
    public static int bottomborder = window.height;
    public static int rightborder = window.width;
    public static int leftborder = 0;
}

Playerstats (mostly unused)

Copypackage main;

public class PlayerStats {
    public static double MaxHp = 10;
    public static double Hp = 10;
    public static double Strength = 1;
    public static double Speed = 1;
    public static double Recovery = 1;
    public static double Attackcooldown = 1;
    public static double Size = 0.03;
    public static double Regeneration = 0;
    public static double Magic = 0;
    public static double Scavenging = 1;
    public static double Clones = 1;
}

ForceofTime (The issue)

Copypackage main;

public class ForceofTime {
    //alien variables
    public PlayerBall player = new PlayerBall();
//----------------------------------------
    public void run() {
        System.out.println("Racim");
        long lastTime = System.nanoTime();
        final double ns = 1000000000.0 / 60.0;
        double delta = 0;
        while(true){
            long now = System.nanoTime();
            delta += (now - lastTime) / ns;
            lastTime = now;
            while(delta >= 1){
                player.BallLogic();
                delta --;
            } 
        } 

   }
    public void doit() {
        new Thread(this::run).start();
    }
}

Keep in mind That I see no prints at all. Not a single one in the console.

I tried putting up an extreme amount of prints, everywhere, to see if Id learn anything anywhere, and effectively I've come to the conclusion literally nothing is happening besides the window popping up.


r/JavaProgramming • • Sep 22 '26

What & How? JAVA Fresher

5 Upvotes

Hey everyone!

I'm 2027 Passout,

I want to ask:

What&How to prepare for off-campus;

I know Java,

how to prepare from scratch?

And from where? ( Like Resources and all )

What should I prepare? ( concepts or topics )

Thank you.


r/JavaProgramming • • Sep 22 '26

[Seeking Project] Java dev looking to collaborate & practice English

3 Upvotes

Hi everyone,

I'm looking to join a collaborative software project to build something cool while improving my English writing and speaking skills. I mainly work with Java and have built a few real-world projects on my own, but I'm eager to get my first experience collaborating within an English-speaking team.

I'm based in UTC+2 (CEST) and available for regular Discord voice calls and text chats. Drop me a DM or leave a comment if you have an active project or want to start something together!


r/JavaProgramming • • Sep 22 '26

🚀 Gradle 9.8.0-rc-3 is here!

Post image
2 Upvotes

r/JavaProgramming • • Sep 22 '26

Java Debugging Best Practices

Thumbnail
medium.com
2 Upvotes

r/JavaProgramming • • Sep 22 '26

Looking for architecture feedback on a Java 21 runtime I’ve been building

Thumbnail
reddit.com
1 Upvotes

r/JavaProgramming • • Sep 22 '26

Guys suggestions for my resume for java dev ( Fresher or intern)

Thumbnail drive.google.com
1 Upvotes

check out through this link


r/JavaProgramming • • Sep 21 '26

5 Best Udemy Courses to learn JVM Internals, Memory Management, GC and Performance Tuning

Thumbnail
javarevisited.blogspot.com
6 Upvotes

r/JavaProgramming • • Sep 21 '26

Looking for architecture feedback on a Java 21 runtime I’ve been building

8 Upvotes

After months of engineering, I'm releasing the Developer Preview of Shree AI OS — an open-source runtime for building intelligent Java backend applications.

Most AI frameworks begin with chat. I took a different approach: a deterministic runtime that developers can embed directly into Spring Boot projects with explainable execution, memory, retrieval, and orchestration.

What it includes Java 21 native SDK

Hybrid RAG with PostgreSQL + pgvector

Episodic & semantic memory

Planning and reasoning pipeline

Multi-agent orchestration

Privacy-first architecture

Architecture Instead of sending every request directly to an LLM, each request flows through a layered runtime:

Application Layer

SDK Layer

Runtime Orchestration

Kernel Services

LLM Provider Layer

The goal is to make AI infrastructure feel like a reusable backend framework rather than another chatbot wrapper.

Looking for technical feedback I'd genuinely appreciate feedback on:

Runtime architecture

SDK design

Spring Boot integration

What should improve before a stable v1.0?

GitHub: https://github.com/darshanrathod04/shree-ai-os

Thanks for reading—every technical critique helps improve the project.


r/JavaProgramming • • Sep 20 '26

Top 150 Java Interview Questions Answers for 3 to 5 Years Experienced Programmers

Thumbnail
medium.com
18 Upvotes

r/JavaProgramming • • Sep 21 '26

Trying to create/generate a Maven project

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Sep 20 '26

Oracle Did It Again. Here’s What This Means for Developers

Thumbnail
javarevisited.substack.com
3 Upvotes

r/JavaProgramming • • Sep 20 '26

JDK 27: JEP 534 makes Compact Object Headers the default. Why did this take so long?

2 Upvotes

JDK 27 ships this weeky, and JEP 534 is one of the changes I find particularly interesting.

Compact Object Headers are now the default.

On a 64-bit JVM, the object header goes from 96 bits to 64 bits. SPECjbb2015 results showed roughly 22% lower heap usage, 8% lower CPU time and 15% fewer GC cycles. Amazon has also tested it across hundreds of production services, including JDK 17 and 21 backports.

But this wasn't a JDK 27 invention.

It started experimentally in JDK 24, became a product feature in JDK 25, and is now the default in JDK 27.

The interesting part is why it took so long.

This isn't just a small optimization. Object headers are fundamental to HotSpot, touching things like class metadata, locking, GC and identity hashing.

It's part of Project Lilliput, with an interesting connection to Project Valhalla because the compact header design also has to leave room for future Valhalla requirements.

And it made me think about those old Java buzzwords: simple, robust, portable, high-performance.

No new syntax. No new API. Just the JVM getting better underneath existing software.

Curious - What other JDK feature has surprised you by improving existing software without requiring changes to the code?


r/JavaProgramming • • Sep 20 '26

I built MVNEX — an open-source CLI for a better Maven developer experience

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Sep 19 '26

Starting DSA in Java

Thumbnail reddit.com
1 Upvotes

r/JavaProgramming • • Sep 18 '26

[Hiring]:Java Application Support Engineer

13 Upvotes

Java Application Support Engineer (FTE/Contract)

Experience: 5–7 Years
Company - LTI Mindtree
Location: Hyderabad
Budget: As per Market Standards

Role Overview

We are looking for a Java Application Support Engineer to provide L1/L2 production support for enterprise applications. The role involves application monitoring, troubleshooting production issues, incident management, and coordination with technical teams to ensure system availability and smooth application operations.

Key Responsibilities
Provide L1/L2 production support for Java-based enterprise applications.
Monitor application health, logs, alerts, and scheduled processes.
Troubleshoot production issues and perform initial Root Cause Analysis (RCA).
Handle incidents, problems, and changes using ticketing tools such as ServiceNow.
Manage the complete ticket lifecycle, including escalation and stakeholder communication.
Support UAT and Production environments, including deployments and configuration changes.
Monitor and manage batch jobs and scheduled processes.
Coordinate with Development, Infrastructure, and DevOps teams for issue resolution.
Maintain SOPs, technical documentation, and knowledge base for recurring issues.
Ensure proper application monitoring, reporting, and support processes.
Technical Skills

Mandatory:

Core Java / Java / J2EE
Spring / Spring Boot
REST APIs / Web Services
Hibernate / ORM Frameworks
Azure Data Factory
ServiceNow ITSM

Secondary Skills:

SQL with Oracle / MySQL
Basic Linux/Unix
Cloud & container basics – OpenShift / Docker
Shell Scripting / Python – Good to Have
CI/CD exposure – Jenkins
SSO, AD & CyberArk integrations – Good to Have
Viva Engage

Support & Monitoring Tools:

ServiceNow / Jira
Splunk / AppDynamics / Dynatrace – Good to Have
Key Requirements
Strong experience in Java application production support.
Hands-on experience in L1/L2 support and incident management.
Good troubleshooting and problem-solving skills.
Ability to work with multiple technical teams and stakeholders.
Strong communication and documentation skills.

DM your CV with this post link….


r/JavaProgramming • • Sep 18 '26

50 System Design Patterns in 15 Minutes

Thumbnail
javarevisited.substack.com
9 Upvotes

r/JavaProgramming • • Sep 18 '26

Leave the Class Path in the Rearview Mirror

Thumbnail
netflixtechblog.com
2 Upvotes

Introducing composable, module system native and agent friendly command line tools for modern Java development.


r/JavaProgramming • • Sep 18 '26

Career Transition: From 2 Years of Java Training Experience to Java Backend Development with AI”

3 Upvotes

Hi I have 2yrs experience in teaching java to trainees

Now as a part of changing my career I want to work with java Backend with AI

I know core java and Python currently learning Spring boot in detail.


r/JavaProgramming • • Sep 18 '26

Java/Spring Boot backend developer with 5+ years experience - looking for freelance work

16 Upvotes

I'm a java backend developer with 5+ years of professional experience, primarily working with Java, SpringBoot, REST APIs, MicroServices, SQL and cloud technologies.

I'm currently looking to take up a freelance backend development projects. I'm particularly interested in projects involving Java/Spring Boot backend development, API development, bug fixing, performance improvements or existing application maintenance.

I haven't done freelance work before, so I'd really appreciate advice from people who have experience finding legitimate freelance projects.

If you know of suitable opportunities or platforms where experienced Java developers can find this type of work, please share them


r/JavaProgramming • • Sep 18 '26

Career Transition: From 2 Years of Java Training Experience to Java Backend Development with AI”

0 Upvotes

Hi I have 2yrs experience in teaching java to trainees

Now as a part of changing my career I want to work with java Backend with AI

I know core java and Python currently learning Spring boot in detail.


r/JavaProgramming • • Sep 17 '26

Feedback wanted: DAO-layered Swing + MySQL app for Science lab inventory/scheduling , it's was a sidequest

Thumbnail
gallery
5 Upvotes

Built a small-to-medium desktop app (S Lab Sync) to manage a school science lab — students, teachers, equipment, chemicals, and experiment scheduling — and figured this sub might have opinions on some of the design choices.

It started as an idea for my Java OOPS Project

A few decisions I'd genuinely like pushback on:

- DB credentials are prompted on first run and cached per-machine (lightly obfuscated, not encrypted) rather than hard-coded or environment-variable based — curious if there's a more idiomatic approach for a small desktop tool like this.

- Schema changes are handled with a simple "check column exists, add if missing" migration on startup instead of a real migration tool (Flyway/Liquibase felt heavy for this scale) — worth it, or should I just bite the bullet?

- Straightforward DAO-per-entity pattern (StudentDAO, TeacherDAO, etc.) rather than a generic repository/ORM. Wanted to actually understand JDBC before reaching for Hibernate.

Code + architecture diagram + project report are all in the repo for useful context.

Repo: https://github.com/Mr-NobodyX7777/s-lab-sync-science-lab-manager-

Mostly posting this to get better at the parts I'm unsure about, not to sell the project — all criticism welcome.


r/JavaProgramming • • Sep 17 '26

Design Google Docs Like a Senior Engineer

Thumbnail
javarevisited.substack.com
2 Upvotes

r/JavaProgramming • • Sep 17 '26

Java Backend Study Buddy – IST – Daily Accountability I'm a working Java backend developer preparing for interviews. Looking for serious study buddy to study together daily. Focus: Core Java, Java 8, Spring Boot, Microservices, SQL and interview questions. Daily: half an hour study + 10-minute progr

Thumbnail reddit.com
2 Upvotes