java - Where is "this" pointing at? -
i know piece of code below far perfect want do. problem can't understand object "this" keyword pointing at.
public class browser extends jfilechooser{ public file browser_creation(){ int r; jfilechooser browser1 = new jfilechooser(); r = browser1.showopendialog(this); if (r == browser.approve_option) { return browser1.getselectedfile(); } else { return null; } } }
this points current instance of browser. in other words, referring object being executed in.
here more information java tutorials: http://download.oracle.com/javase/tutorial/java/javaoo/thiskey.html
Comments
Post a Comment