Tuesday, December 10, 2019

The Difference (awt vs swing)


the java awt and swing are both java toolkits for creating
GUIs. Wanted to get cler about the difference, and found interesting
code on this. All the app does is create two text fields, and what is written
goes from one to the other on button.

The AWT one:


All very nice, but the window doesn't close. Need to add the following code:


Two things to watch for here; one needs to be within the main method so
that the f. will be recognized. And, one is asking for System to close the app.

                                                   *     *     *
Below, the same app but with swing code (still need awt for the ActionListener).



The window closes without specific code (but the app doesn't).
One would need to add the ever-present:

 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);the
difference (AWT Swing)

https://www.stechies.com/difference-between-awt-swing/

                                                            *     *     *

Any use of system color will have to go through awt.

                                       

And we can go for RGB colors as well.


java.swing will produce backgound as long as get
ContentPane() is invoked.



*     *     *






1 comment:

Unknown said...

Can a freelance developer pursuing a net developer job continue to work up with additional companies?

It is possible to take up extra work, but your employer might have certain conditions and rules about side activities. If the terms are mentioned in the contract, and you have signed it, it might be problematic. Also, don’t take the employer for granted, maintain the balance between net developer job by creative and ethical thinking. Don’t let the manager know of the extra work you are pursuing, and choose assignments only for evenings and weekends, otherwise, the scale between both the works will not be stable, and there is a chance that you might end up losing both of them.

Going for a freelancing dot net developer job will be a critical success. Eiliana can help you with finding quality clients for freelancing assignments by keeping the identity anonymous.