{"id":26906122,"url":"https://github.com/msh-trojan/java_21_jframe_show_colors_1","last_synced_at":"2025-04-01T11:00:03.870Z","repository":{"id":254301739,"uuid":"846120759","full_name":"MSH-trojan/Java_21_JFrame_Show_Colors_1","owner":"MSH-trojan","description":"Programm showing How we can represent Colors on a canvas using JFrame class and the GUI components(here we use the paint() component).","archived":false,"fork":false,"pushed_at":"2024-08-22T15:32:44.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-22T17:11:56.951Z","etag":null,"topics":["awt-gui","graphics","gui-components","inheritance","java","jframe","paint","swing-gui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MSH-trojan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-22T15:13:39.000Z","updated_at":"2024-08-22T17:12:08.423Z","dependencies_parsed_at":"2024-08-22T17:12:07.054Z","dependency_job_id":"fbe402b9-12f4-439e-a964-819e1ec87872","html_url":"https://github.com/MSH-trojan/Java_21_JFrame_Show_Colors_1","commit_stats":null,"previous_names":["msh-trojan/java_21_jframe_show_colors_1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_JFrame_Show_Colors_1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_JFrame_Show_Colors_1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_JFrame_Show_Colors_1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_JFrame_Show_Colors_1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MSH-trojan","download_url":"https://codeload.github.com/MSH-trojan/Java_21_JFrame_Show_Colors_1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246628209,"owners_count":20808106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awt-gui","graphics","gui-components","inheritance","java","jframe","paint","swing-gui"],"created_at":"2025-04-01T11:00:03.158Z","updated_at":"2025-04-01T11:00:03.858Z","avatar_url":"https://github.com/MSH-trojan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java_21_JFrame_Show_Colors_1\n\n### Some general notations:\n\nGraphics applications typically employ many classes.\n\nMany of these classes are part of the Abstract Windows Tools (*AWT*)\n\nTo see the wealth of classes available in Java use the website: **http://docs.oracle.com/javase/7/docs/api**\n\n### Comments about the JFrame example:\n\nThe JFrame application *ShowColors* is a driver type class.\n\nIn the class *ShowColors*, presented in the previous 2 slides, we saw the following methods/constructor:\n\n1 - ***main()***, which is the regular driver method for any application on your computer.\nIn this case its main job is to create a ShowColors object with the reference “application”. \nThis will call the constructor with no parameters.\nA secondary job is to provide the feature “X” on the top right corner of the frame created, which if clicked will close the frame.\n\n\n2 - The constructor ***ShowColors()*** contains 3 calls to JFrame methods: *super()*, passes to the JFrame constructor a text which will appear on the frame title bar, *setSize()* gives \nthe width and the height of the frame, and *show()*.\n\n\n3 - The Graphics method *paint()* is overwritten in class *ShowColors*.\n Class Graphics is above class JFrame in the inheritance tree of Java Development Kit. \n\n\n4 - The Graphics methods drawString() and fillRect() use x,y coordinates. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsh-trojan%2Fjava_21_jframe_show_colors_1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsh-trojan%2Fjava_21_jframe_show_colors_1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsh-trojan%2Fjava_21_jframe_show_colors_1/lists"}