i've been programming a level editor for the past few days, and have come across something that doesn't seem right to me. i have a JFrame on which i instantiate two JPanels. One as a statusbar, which displays the selected image, and another which holds tiles. Each tile has a corresponding number. i have an ActionListener which sees which tile the user clicks on and then proceeds to set the statusbars' image. right now i do this by calling
MapEditor being the JFrame and statusBar being the statusbar that is instantiated in the MapEditor class.MapEditor.statusBar.setImage(cTile,iCol);
this seems like really bad code to me yet i can not find a better way to do this.
any tips would help thanks.