Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean resizeSplitPane(double gameWindowPercentage) {
- JFrame tribotFrame = findTRiBotFrame();
- if (tribotFrame == null) {
- General.println("Error, could not find TRiBot Frame. Cannot resize debug.");
- return false;
- }
- if (gameWindowPercentage < 0 || gameWindowPercentage > 1) {
- General.println("Error, percentage argument is not between 0 and 1.");
- }
- JSplitPane tribotSplit = (JSplitPane) tribotFrame.getContentPane().getComponent(0);
- tribotSplit.setDividerLocation(gameWindowPercentage);
- return true;
- }
- public static JFrame findTRiBotFrame(){
- for(Frame frame:JFrame.getFrames()){
- if(frame.getTitle().contains("TRiBot Old-School")){
- return (JFrame) frame;
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement