Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8399103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:12:36+00:00 2026-06-09T21:12:36+00:00

I am complete Java noob and this question will be very easy. I did

  • 0

I am complete Java noob and this question will be very easy. I did try to find answer across whole internet but, nothing was particularly what I need (if you know any tutorial pages for this subject please post link I would be very grateful.)

Basically I am trying to draw string in my DrawPanel. I know I need to call method somewhere in order to do so but I have no idea where. My draw panel has method:

public void drawGuessWord(Graphics g){
    WordsList guessWord = new WordsList();
    String word = guessWord.pickWord();
    g.drawString(word, 20, 20);
}

And I want to call that method so it would draw string inside DrawPanel.

Just in case this is my whole DrawPanel:

import java.awt.*;
import javax.swing.*;
import javax.swing.border.Border;

public class DrawPanel extends JPanel {

    DrawPanel(){
        Border raisedbevel = BorderFactory.createRaisedBevelBorder();
        Border loweredbevel = BorderFactory.createLoweredBevelBorder();
        this.setBackground(Color.WHITE);
        this.setBorder(BorderFactory.createLoweredBevelBorder());
        this.setPreferredSize(new Dimension(200,200));
    }

    public void drawGuessWord(Graphics g){
        WordsList guessWord = new WordsList();
        String word = guessWord.pickWord();
        g.drawString(word, 20, 20);
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:12:37+00:00Added an answer on June 9, 2026 at 9:12 pm
    public void paint(Graphics g)
    {
      g.drawString(word, 20, 20);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: The author of this question has some Java background, but is a complete
This is a complete noob question, but I gotta ask it anyway I started
Cntrl+B( or clean-> build) will build complete java project under eclipse environment. Is this
I'm a complete noob in java. I still really don't know how to code.
complete noob to Haskell here with probably an even noobier question. I'm trying to
First of all, I am a complete Java NOOB. I want to handle multiple
I have a question to complete using Java Polynomials. I've set up all my
I am working on a more complete email validator in java and came across
Noob question, using Win7 64-bit, Clojure 1.2.0, Java 1.6.0_22 When I start clojure from
I've done threads in Java, but I'm a complete noob to threads in C.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.