Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Other Programming › Java › need help with moving objects

need help with moving objects

Posts 1–2 of 2 · Page 1 of 1
pwnagebeef
pwnagebeef
need help with moving objects
well i've been assigned to make a simple java game but im already having trouble .. i need to get something to move across the screen. I'm trying to get a rectangle to go across the top portion of the application. ofc I've youtubed and everything but i still get this smudge across the top of the screen when i do the fillRet ; when i do drawRect i get a bunch of lines spaced across. In case your curious of what im trying to make, i will be attempting to make a game sorta like fruit ninja. Much much simpler of course. Currently i just need to get an object to move :L Once i do that ill add pictures mouse stuff etc..Here's the code.

Code:
package gameapplication;

import java.aw*****lor;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import javax.swing.*;
import java.awt.event.ActionListener;
import javax.swing.Timer;


@SuppressWarnings("serial")
public class gameapp1 extends JFrame implements ActionListener{
Timer tm = new Timer(5,this);
int x =0, velX=2;

    public gameapp1 (){
        setSize(800,850);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setResizable(true);        
        setVisible(true);
        
        
          }
    
    public void paint(Graphics g){
       
       
    g.setColor(Color.RED);
    g.drawRect(x, 57, 90, 30);
    
    tm.start();
    
    }
    
    public void actionPerformed(ActionEvent e){
    x = x + velX;
    repaint();}
public static void main(String[] args) {
    gameapp1 gm = new gameapp1();
    
    
}}
#1 · 14y ago
pwnagebeef
pwnagebeef
nvm i solved it
#2 · 14y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

  • need help with moddingBy BayBee Alyn in Combat Arms Help
    0Last post 15y ago
  • need help with modBy .:MUS1CFR34K:. in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    4Last post 15y ago
  • Need help with numpad while recording macro !By JonathanTBM in Vindictus Help
    2Last post 15y ago
  • Need help with making binds !By JonathanTBM in Vindictus Help
    4Last post 15y ago
  • Need Help With A.V.A ErrorBy ch1025 in Alliance of Valiant Arms (AVA) Help
    7Last post 15y ago

Tags for this Thread

None