29 ms·
The difference is that javax.swing.JOptionPane is a class whereas image/color is a package containing functions and types. x := color.RGBA{255, 255, 255, 0} is
by iand 14y ago
The difference is that javax.swing.JOptionPane is a class whereas image/color is a package containing functions and types.
x := color.RGBA{255, 255, 255, 0} is instantiating an RGBA type from the image/color package
- yummyfajitas 14y agoIn Java: import org.somelib.colors.* x = new RGBA(255, 255, 255, 0); where RGBA is some class defined in the org.somelib.colors package.
- ssmoot 14y agoI think they're looking for: import org.somelib.* x = new colors.RGBA(255, 255, 255, 0); So you don't have to bring all the classes into scope, but you don't have to write out the full path to use them either. Just the last bit of the package-name as a qualifier.
- plorkyeran 14y agoIn C# that'd be: using colors = org.somelib.colors; I don't know if Java has something similar.
- wolverian 14y agoIt doesn't.