java - How to add objects to a class that I cannot edit -
i using stddraw.java library , can't edit file. want add various items jframe such jmenu, buttons , others without compromising canvas , jframe.
i have tried stddraw.class.getmethods"
yet can't seem work. seems can use methods inside class , don't add of own or edit ones in.
the file available online. how able achieve above?
stddraw.java final class, if not mistaken. final class cannot extended. have 2 options:
- you can directly use source add own attributes , compile yourself, if license permits kind of usage.
- you can encapsulate stddraw.java class, own wrapper class , direct method calls using java reflection.
Comments
Post a Comment