Can you be more specific when you say you could not "run" this example? What happens? Compilation error? RunTime Error? The result is not what you expected? W.
Originally posted by Willie Toma: [B]I've been unable to run this code. I tried to implement this constructor in a class. Does anyone have any suggenstions? What i've tried hasn't worked. [/B]
Your GridbagDemo class doesn't explicitly extend any other class. Therefore super("GridBagLayout") will fail, as Object has no such constructor. Did you intend for this class to extend Frame?
It was an incomplete example that was in a book. To display the example I tried to place it in the following block of code. [CODE] import java.awt.*; import java.awt.event.*; class GridBag extends Frame{ public static void main(String[] args){ new GridBagDemo().show(); } // Example code here } Is this the correct way to go about this. Thanks in advance
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad: