awt - Editable Java Drawing2D Texts and Images -


for gym exercise machine, need modify continuously texts , images inside jpanel.

drawimage() , drawstring() worked fine, 'dumb'. have repaint everytime.

the pseudo-code following:

public class cscreen extends jpanel {      public cscreen()     {         repaint();     }      public void paint(graphics g)     {         bufferedimage img=...some image...;         int ximg= ...variable location...;         int yimg= ...variable location...;         g.drawimage(img,ximg,yimg,...);          graphics2d g2 = (graphics2d) g;          g2.setfont(...);         g2.setcolor(...);          string txt = ...some text...;         int xtxt= ...variable location...;         int ytxt= ...variable location...;         g2.drawstring(txt,xtxt,ytxt,...);     } } 

is there way deal text , images, if objects, not pixels drawn?

please, help, appreciated.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -