Java
public static void main(String[] args) {
Bus bus = new Bus();
String [] arTms = {"BUS", "SUBWAY", "EXIT"};
int choice = 0;
int money = 10000;
while(true) {
choice = JOptionPane.showOptionDialog(null, "이용하실 대중교통을 선택하세요", "TMS",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE, null, arTms, null);
if(choice == 2)break;
if(choice == 0) {
int buttonIndex = JOptionPane.showOptionDialog(null, "도착지를 선택하세요", "TMS-BUS",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE, null, arStation, null);
bus.pay(money);
bus.go(buttonIndex);
}
}
}
html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
</title>
<style>
#grid {
border: 3px solid pink;
display: grid;
grid-template-columns: 150px 1fr;
}
div {
border: 3px solid gray;
}
</style>
</head>
<!-- span==inline tag / div== blockLevle tag(eliment)-->
<body>
<div id="grid">
<div>NAVIGARION</div>
<div>ARTICLE</div>
</div>
</body>
</html>
css
/* Web Font Load */
@import url('//fonts.googleapis.com/earlyaccess/notosanskr.css');
@import url('//fonts.googleapis.com/css?family=Nanum+Myeongjo');
/* Type Selector Reset */
body {
font-weight: 500;
font-family: 'Noto Sans KR', sans-serif;
font-size: 1em;
line-height: 1.25;
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
}
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
font-size: 100%;
}
댓글