#Repainting

1 messages · Page 1 of 1 (latest)

ornate sirenBOT
#

@slow coral has a question:

dr_buhu

if u repaint do u have to add the object in again (this is such a short question pls just let me have it here)

#

<@&987246399047479336> please have a look, thanks.

crystal lichen
#

can you give more context

#

what exactly do you mean by repaint? you talking about swing?

slow coral
#

i have added my graphics

#

and now im repainting it

#

do i have to add it again?

crystal lichen
#

can you share your current code

slow coral
#

im not sure if that helps tho

#

all im asking is if i have to add g again after i repaint g

slow coral
#

oh alr

#

(i cant close the post)

crystal lichen
#

/help-thread close

hoary nebula
#

what are you adding g to?

slow coral
#

the panel

hoary nebula
#

this seems strange

#

g being Graphics g?

slow coral
#

yep

#

oh

#

i mean no

#

xD

#

g being the class

#

of public void paintComponent(Graphics g) {

crystal lichen
#

well g is Graphics

hoary nebula
#

im confused. you cant add Graphics to a container

slow coral
#

im adding the class of paintComponent

hoary nebula
#

only Component objects can be added, and Graphics is not a component

#

oh, alright

slow coral
#

ye :p

slow coral
# hoary nebula no

alr then something else is wrong with my code but i think i can figure that out :p

#

/help-thread close

ornate sirenBOT
#

Closed the thread.