2020.11.30 TIL

Swing Layout

자바 스윙에서는 기본으로 제공하는 레이아웃이 많이 없다. 그리고 원하는 배치가 한번에 되지 않을 가능성이 매우 높다. (대표적인 예로 여백의 미가 없다) 따라서 레이아웃을 원하는 방식으로 배치하기 위해서는 패널에 패널을 add하고, 또 패널에 또 다른 패널을 add 하고, … 이렇게 반복하여 배치하는 방법이 있다. 이렇게 하면 장점으로는 Resizable한 상태일때 약간의 반응형 디자인이 가능하다는 점이다. 하지만 자바 스윙에서 그런부분까지 고려하여 디자인을 하기에는 너무나도 까다롭다.

두번째 방법으로는 수동으로 레이아웃을 배치하는 방법이다. 이때에는 원하는 위치에 원하는 사이즈로 정확히 배치할 수 있다. 이렇게 배치를 할 때는 Frame.setLayout(null)로 먼저 배치관리자의 사용을 해제 해주어야 한다.

https://okky.kr/article/324559

https://blog.naver.com/jmszzzzz/10178215384

https://stackoverrun.com/ko/q/10465005

https://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html

https://stackoverflow.com/questions/4727486/java-swing-a-problem-using-layout-managers

https://stackoverflow.com/questions/33576358/how-to-use-java-swing-layout-manager-to-make-this-gui

Swing Tab

https://smilekimna.tistory.com/entry/Swing-Tab-%EA%B8%B0%EB%8A%A5-%EC%B6%94%EA%B0%80

https://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html

https://m.blog.naver.com/PostView.nhn?blogId=battledocho&logNo=220012077952&proxyReferer=https:%2F%2Fwww.google.com%2F

How to set a transparant background in Java Swing

https://stackoverflow.com/questions/2545214/how-to-set-a-transparent-background-of-jpanel

How to remvoe title bar in Java Swing

https://stackoverflow.com/questions/8701716/how-to-remove-title-bar-in-jframe/8701948

getContentPane().setBackgroundColor() does not working

https://stackoverflow.com/questions/26810323/getcontentpane-setbackground-doesnt-seem-to-work

JFrame.setBackGroundColor() does not working

https://stackoverflow.com/questions/2742270/jframe-setbackground-not-working-why

LogIn 클래스에서는 getContentPane().setBackground()이 순간적으로 보였다가 덮어써진다. JPanel에 또 다른 JPanel 두 개를 넣어서 JFrame에 add하는 형태로 작성하였는데, 그냥 JPanel.setBackground()로 일일이 바꿔주는 방식으로 구현하였다.

How to use color chooser

https://docs.oracle.com/javase/tutorial/uiswing/components/colorchooser.html

Change ActionListener interface to lambda expression

https://www.codejava.net/java-core/the-java-language/java-8-lambda-listener-example

How to get Enter key in Java Swing

https://stackoverflow.com/questions/13731710/allowing-the-enter-key-to-press-the-submit-button-as-opposed-to-only-using-mo

https://www.tutorialspoint.com/swing/swing_key_listener.htm

KeyListener not working

https://stackoverflow.com/questions/16530775/keylistener-not-working-for-jpanel

KeyListener를 구현하여 재정의된 keyPressed메서드에서 엔터키를 받아오는 방법을 사용하려 했으나, 텍스트 필드에 글을 입력하면 포커스가 벗어나게 되어 키입력을 인식하지 못하는문제가 있었다. 또 다른 글에서는 엔터키 입력 시 기본으로 동작할 버튼하나만 지정하는 경우에 구태여 KeyListener를 구현할 필요가 없다고 설명한다.

https://stackoverflow.com/questions/31748578/add-a-keylistener-in-my-login-jpanel

가계부 템플릿

http://kimjmin.net/2016/12/dmitri-account-book-2017/

https://docs.google.com/spreadsheets/d/1y626Oq27d7TxB28KNRMmAxQs7AS56lHc-PJ1JsCrWyI/edit#gid=0

Google Map API

The Google Maps Platform server rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account

https://developers.google.com/maps/documentation/maps-static/get-api-key

The Google Maps Platform server rejected your request. This API project is not authorized to use this API.

https://stackoverflow.com/questions/19408066/the-google-maps-api-server-rejected-your-request

The Google Maps Platform server rejected your request. You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started