Skip to content

Unchecked Call JComboBox#35

Merged
pH-7 merged 1 commit into
pH-7:masterfrom
jfullstackdev:master
Feb 19, 2020
Merged

Unchecked Call JComboBox#35
pH-7 merged 1 commit into
pH-7:masterfrom
jfullstackdev:master

Conversation

@jfullstackdev
Copy link
Copy Markdown
Contributor

The JComboBox is asking what is the type of elements for every instance of it. Without specifying it, the compiler will always issue a warning saying there is unchecked call, although will still compile, but our code must be clean. So, in this case:

private final JComboBox fontType;
private final JComboBox fontSize;

and,

fontType = new JComboBox( );
fontSize = new JComboBox( );

The `JComboBox` is asking what is the data type for every instance of it. So, in this case: 

private final JComboBox<String> fontType;
private final JComboBox<Integer> fontSize;

and,

fontType = new JComboBox<String>( );
fontSize = new JComboBox<Integer>( );
Copy link
Copy Markdown
Owner

@pH-7 pH-7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@pH-7
Copy link
Copy Markdown
Owner

pH-7 commented Feb 19, 2020

Thanks a million!

@pH-7 pH-7 merged commit 2eef7c9 into pH-7:master Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants