[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0000,0000,0000,,[intro music] Dialogue: 0,0:00:10.00,0:00:14.00,Default,,0000,0000,0000,,This presentation is delivered by the Stanford Center for Professional Development. Dialogue: 0,0:00:22.00,0:00:26.00,Default,,0000,0000,0000,,It's time to delve into a continuation of our last great topic. Okay? Dialogue: 0,0:00:26.00,0:00:30.00,Default,,0000,0000,0000,,So, it's time to continue a bit with our friend the "interactor". Dialogue: 0,0:00:30.00,0:00:34.00,Default,,0000,0000,0000,,And if we think about the interactor, an action listener...so last time we talked about Dialogue: 0,0:00:34.00,0:00:38.00,Default,,0000,0000,0000,,having buttons and buttons-generated action events. Remember that? Dialogue: 0,0:00:38.00,0:00:41.00,Default,,0000,0000,0000,,So we're going to do a brief review of that and push it a little bit further. Dialogue: 0,0:00:41.00,0:00:46.00,Default,,0000,0000,0000,,So one of things we talked about is: how in your program, say, in your init method Dialogue: 0,0:00:46.00,0:00:50.00,Default,,0000,0000,0000,,somewhere you might have "public void init ()" Dialogue: 0,0:00:51.00,0:00:54.00,Default,,0000,0000,0000,,and inside here you would set up sort of the Dialogue: 0,0:00:54.00,0:00:57.00,Default,,0000,0000,0000,,parts of your program that you want to actually do something, like, the various Dialogue: 0,0:00:57.00,0:01:00.00,Default,,0000,0000,0000,,interactors so that when someone clicks on them something happens Dialogue: 0,0:01:00.00,0:01:07.00,Default,,0000,0000,0000,,and then you would say, "add ActionListeners". And what this would do Dialogue: 0,0:01:07.00,0:01:10.00,Default,,0000,0000,0000,,is basically say,"Hey I got some buttons in my program, Dialogue: 0,0:01:10.00,0:01:14.00,Default,,0000,0000,0000,,I want you to be listening for buttons so when someone clicks on a button, I want you to call Dialogue: 0,0:01:14.00,0:01:17.00,Default,,0000,0000,0000,,a particular method for me called 'ActionPerformed' Dialogue: 0,0:01:17.00,0:01:20.00,Default,,0000,0000,0000,,and then based on when you call ActionPerformed, I'll figure out what button was clicked Dialogue: 0,0:01:20.00,0:01:23.00,Default,,0000,0000,0000,,and then actually do something." \NOkay? Dialogue: 0,0:01:23.00,0:01:25.00,Default,,0000,0000,0000,,So, over here we had our friend Dialogue: 0,0:01:25.00,0:01:29.00,Default,,0000,0000,0000,,"public void ActionPerformed" Dialogue: 0,0:01:29.00,0:01:37.00,Default,,0000,0000,0000,,And "ActionPerformed" would get as its parameter something called an "ActionEvent". Dialogue: 0,0:01:37.00,0:01:41.00,Default,,0000,0000,0000,,And an ActionEvent (we'd just refer to it as "e"), Dialogue: 0,0:01:41.00,0:01:43.00,Default,,0000,0000,0000,,was basically what it would check to see Dialogue: 0,0:01:43.00,0:01:47.00,Default,,0000,0000,0000,,what action was actually taken or basically which button was actually clicked. Okay? Dialogue: 0,0:01:47.00,0:01:51.00,Default,,0000,0000,0000,,So hopefully you remember that. That's a little bit of review from last time. Dialogue: 0,0:01:51.00,0:01:53.00,Default,,0000,0000,0000,,Now, when we got this action event we said there are a couple things you could do with it. Dialogue: 0,0:01:54.00,0:01:58.00,Default,,0000,0000,0000,,Well, there is actually one main thing we talked about which you could do with it Dialogue: 0,0:01:58.00,0:02:02.00,Default,,0000,0000,0000,,and you could figure out which command was actually the thing that caused this action event Dialogue: 0,0:02:02.00,0:02:05.00,Default,,0000,0000,0000,,to be generated by saying, "Hey, you know what i want to do?" Dialogue: 0,0:02:05.00,0:02:09.00,Default,,0000,0000,0000,,I wanna pull out as a string (and I'll just call it 'cmd' for 'command') Dialogue: 0,0:02:09.00,0:02:12.00,Default,,0000,0000,0000,,the command, or, the name of the interactor Dialogue: 0,0:02:12.00,0:02:15.00,Default,,0000,0000,0000,,that caused this ActionPerformed method to be called." So here I would say Dialogue: 0,0:02:15.00,0:02:17.00,Default,,0000,0000,0000,,e dot Dialogue: 0,0:02:17.00,0:02:19.00,Default,,0000,0000,0000,,command equals e dot Dialogue: 0,0:02:19.00,0:02:22.00,Default,,0000,0000,0000,,getActionCommand Dialogue: 0,0:02:22.00,0:02:25.00,Default,,0000,0000,0000,,and what GetActionCommand does...it's just a method Dialogue: 0,0:02:25.00,0:02:30.00,Default,,0000,0000,0000,,of this ActionEvent that says,"Hey, I'll return to you the name of the interactor as a string Dialogue: 0,0:02:30.00,0:02:33.00,Default,,0000,0000,0000,,and buttons' names are basically just whatever displays on the button. Dialogue: 0,0:02:33.00,0:02:38.00,Default,,0000,0000,0000,,So then I could have some ifs in here based on this command, "if command dot equals" Dialogue: 0,0:02:38.00,0:02:40.00,Default,,0000,0000,0000,,and I can check for some name, then I might wanna take some action based on that button. Dialogue: 0,0:02:42.00,0:02:45.00,Default,,0000,0000,0000,,It turns out there something else you can ask this ActionEvent e for Dialogue: 0,0:02:45.00,0:02:47.00,Default,,0000,0000,0000,,other than the action command Dialogue: 0,0:02:47.00,0:02:50.00,Default,,0000,0000,0000,,you saw this very briefly last time in the program that we did and you're going to see it a little bit more now, Dialogue: 0,0:02:50.00,0:02:54.00,Default,,0000,0000,0000,,so i want to spend a little bit more time on it Dialogue: 0,0:02:54.00,0:02:56.00,Default,,0000,0000,0000,,which is something where you can say, "Hey e, Dialogue: 0,0:02:56.00,0:03:02.00,Default,,0000,0000,0000,,what i want to get from you is not the action command, I want to get the source of the action." Dialogue: 0,0:03:02.00,0:03:07.00,Default,,0000,0000,0000,,Now the interesting thing about what "getSource" returns to you...actually let me not put the semicolon Dialogue: 0,0:03:07.00,0:03:09.00,Default,,0000,0000,0000,,here right now... Dialogue: 0,0:03:09.00,0:03:12.00,Default,,0000,0000,0000,,is getSource actually returns to you an object. Dialogue: 0,0:03:12.00,0:03:17.00,Default,,0000,0000,0000,,It returns to you the object that caused this event to be generated, which means if a button was clicked Dialogue: 0,0:03:19.00,0:03:22.00,Default,,0000,0000,0000,,e.getActionCommand will get the name of the button Dialogue: 0,0:03:22.00,0:03:27.00,Default,,0000,0000,0000,,e.getSource will actually give you a reference to the button object. Dialogue: 0,0:03:27.00,0:03:31.00,Default,,0000,0000,0000,,So what you're getting back from this is an object. You're getting a reference to that object. Dialogue: 0,0:03:31.00,0:03:34.00,Default,,0000,0000,0000,,So, what does that mean for you in, sort of, your everyday life? Dialogue: 0,0:03:34.00,0:03:37.00,Default,,0000,0000,0000,,What that means is: over here when you want to set up your initialization Dialogue: 0,0:03:37.00,0:03:40.00,Default,,0000,0000,0000,,You could say, "Hey I want to create a button." Dialogue: 0,0:03:40.00,0:03:42.00,Default,,0000,0000,0000,,And so i'll have some button i want to create Dialogue: 0,0:03:42.00,0:03:45.00,Default,,0000,0000,0000,,so I'll say "new JButton" Dialogue: 0,0:03:46.00,0:03:49.00,Default,,0000,0000,0000,,and maybe that button, i want it to say "Hi" on it Dialogue: 0,0:03:49.00,0:03:54.00,Default,,0000,0000,0000,,And so one thing I can do is I could say, "hi = new JButton"and "hi" Dialogue: 0,0:03:54.00,0:03:58.00,Default,,0000,0000,0000,,what I'm going to do is make that an instance variable Dialogue: 0,0:03:58.00,0:04:03.00,Default,,0000,0000,0000,,so somewhere down here in my program where I have my ivars, my instance variables, Dialogue: 0,0:04:03.00,0:04:11.00,Default,,0000,0000,0000,,i would have "private JButton hi;" \NSo I just do the declaration of a variable called "Hi" Dialogue: 0,0:04:11.00,0:04:13.00,Default,,0000,0000,0000,,which is of type JButton and then in my initialization method Dialogue: 0,0:04:13.00,0:04:17.00,Default,,0000,0000,0000,,i actually create that button with the label "Hi" on it Dialogue: 0,0:04:17.00,0:04:20.00,Default,,0000,0000,0000,,and then i go ahead and add it somewhere to Dialogue: 0,0:04:20.00,0:04:25.00,Default,,0000,0000,0000,,one of the control bars in my programs. So I would say, "add 'hi' maybe to the SOUTH control bar" Dialogue: 0,0:04:25.00,0:04:27.00,Default,,0000,0000,0000,,because we really like adding things to the SOUTH control bar Dialogue: 0,0:04:27.00,0:04:30.00,Default,,0000,0000,0000,,It's just fun when buttons show up on the bottom of our screen. Dialogue: 0,0:04:30.00,0:04:33.00,Default,,0000,0000,0000,,So we say, "Add it there" and then wait for something to happen. Dialogue: 0,0:04:33.00,0:04:35.00,Default,,0000,0000,0000,,So add my action listener in case this button gets clicked. Dialogue: 0,0:04:35.00,0:04:37.00,Default,,0000,0000,0000,,Now when the button gets clicked over here, Dialogue: 0,0:04:37.00,0:04:40.00,Default,,0000,0000,0000,,what i can do Dialogue: 0,0:04:40.00,0:04:41.00,Default,,0000,0000,0000,,as i could actually Dialogue: 0,0:04:41.00,0:04:47.00,Default,,0000,0000,0000,,ask command to get its name. Right? Or I could ask the action event to get the action command name Dialogue: 0,0:04:47.00,0:04:52.00,Default,,0000,0000,0000,,and then i could say something like," if (cmd.equals " Dialogue: 0,0:04:52.00,0:04:56.00,Default,,0000,0000,0000,,and the name of the particular button that i created over there happens to be ("Hi"). If it happens to be "Hi" Dialogue: 0,0:04:57.00,0:05:02.00,Default,,0000,0000,0000,,then there's something i want to do, like maybe i'd want to print something on the screen or whatever the case may be. Dialogue: 0,0:05:03.00,0:05:04.00,Default,,0000,0000,0000,,That's one way i could write this Dialogue: 0,0:05:04.00,0:05:07.00,Default,,0000,0000,0000,,and this is kind of the classic way that you've seen it written before. Dialogue: 0,0:05:07.00,0:05:09.00,Default,,0000,0000,0000,,Okay? That's the way you saw it last time. Dialogue: 0,0:05:09.00,0:05:14.00,Default,,0000,0000,0000,,The other way i can write it with my friend "get source" is: rather than getting the name of the command Dialogue: 0,0:05:14.00,0:05:16.00,Default,,0000,0000,0000,,and checking to see if the command is equal to ("Hi") Dialogue: 0,0:05:16.00,0:05:21.00,Default,,0000,0000,0000,,i can actually say, "Hey, you know what? Mehran told me about this thing called e.getSource Dialogue: 0,0:05:21.00,0:05:24.00,Default,,0000,0000,0000,,as a matter of fact i don't even need this line for command Dialogue: 0,0:05:24.00,0:05:27.00,Default,,0000,0000,0000,,anymore let me just comment it out so I don't erase it, okay? Dialogue: 0,0:05:27.00,0:05:33.00,Default,,0000,0000,0000,,And I can say, " if (e.getSource ... this returns an object to me Dialogue: 0,0:05:33.00,0:05:38.00,Default,,0000,0000,0000,,i want to check to see if that object that it returns is my ("Hi") button Dialogue: 0,0:05:38.00,0:05:44.00,Default,,0000,0000,0000,,so here i check directly, is it equal equal to "hi" and then I do whatever I was going to do Dialogue: 0,0:05:44.00,0:05:48.00,Default,,0000,0000,0000,,so this has exactly the same effect as before. It's checking to see if I've gotten a button Dialogue: 0,0:05:48.00,0:05:52.00,Default,,0000,0000,0000,,that is the "Hi" button that was clicked. Okay? Dialogue: 0,0:05:52.00,0:05:56.00,Default,,0000,0000,0000,,so the difference between these two things if you kind of think about them, right?, one of them is Dialogue: 0,0:05:56.00,0:06:01.00,Default,,0000,0000,0000,,i'm just using the name is a string and the other ones i'm using the actual object Dialogue: 0,0:06:01.00,0:06:07.00,Default,,0000,0000,0000,,Now if you think about more deeply what that means if i think about the name over here, right? Dialogue: 0,0:06:07.00,0:06:12.00,Default,,0000,0000,0000,,If i think just in terms of the name i never need to be able to refer to the actual object Dialogue: 0,0:06:12.00,0:06:15.00,Default,,0000,0000,0000,,which means that if i don't need to refer to the actual object again over here Dialogue: 0,0:06:15.00,0:06:20.00,Default,,0000,0000,0000,,I don't necessarily need it as an instance variable. I only need it as an instance variable if I'm going to refer Dialogue: 0,0:06:20.00,0:06:24.00,Default,,0000,0000,0000,,to it again in someplace that's in a different method Dialogue: 0,0:06:24.00,0:06:26.00,Default,,0000,0000,0000,,that's some other method i may have already used it in. Dialogue: 0,0:06:26.00,0:06:31.00,Default,,0000,0000,0000,,So let me show you an example of what i mean by that in code to make that more concrete. Dialogue: 0,0:06:31.00,0:06:33.00,Default,,0000,0000,0000,,Okay, so if we come over here to code Dialogue: 0,0:06:33.00,0:06:35.00,Default,,0000,0000,0000,,here's essentially the code i just wrote Dialogue: 0,0:06:35.00,0:06:39.00,Default,,0000,0000,0000,,for basically creating a button so it's just the code i wrote on the board, right? Dialogue: 0,0:06:39.00,0:06:43.00,Default,,0000,0000,0000,,except I just made the font bigger. i create a button with the name "hi" Dialogue: 0,0:06:43.00,0:06:47.00,Default,,0000,0000,0000,,i put in the southern region. I add my action listeners to listen for that button getting clicked. Dialogue: 0,0:06:47.00,0:06:52.00,Default,,0000,0000,0000,,When the button gets clicked I say, "Hey. Is the thing that got clicked this button I created?" Dialogue: 0,0:06:52.00,0:06:54.00,Default,,0000,0000,0000,,Here i actually called it HiButton. Dialogue: 0,0:06:54.00,0:06:57.00,Default,,0000,0000,0000,,instead of just "hi" over there. I shortened it to "hi" so it would take up less board space. Dialogue: 0,0:06:57.00,0:07:02.00,Default,,0000,0000,0000,,if it's actually the source of that action is not have my high but not all Dialogue: 0,0:07:02.00,0:07:04.00,Default,,0000,0000,0000,,will print out below them Dialogue: 0,0:07:04.00,0:07:07.00,Default,,0000,0000,0000,,so i can go ahead and run this program Dialogue: 0,0:07:07.00,0:07:13.00,Default,,0000,0000,0000,,and if i run this program this is now i click on get the same thing i saw the four everytime i click on a get Dialogue: 0,0:07:13.00,0:07:14.00,Default,,0000,0000,0000,,hello there Dialogue: 0,0:07:14.00,0:07:17.00,Default,,0000,0000,0000,,now alternatively i could have written some slightly differently which is the Dialogue: 0,0:07:17.00,0:07:18.00,Default,,0000,0000,0000,,way you saw a blast time Dialogue: 0,0:07:18.00,0:07:21.00,Default,,0000,0000,0000,,what i can do here as i can say hey Dialogue: 0,0:07:21.00,0:07:25.00,Default,,0000,0000,0000,,when i'm going to do the added just go ahead and create that button and add it Dialogue: 0,0:07:25.00,0:07:29.00,Default,,0000,0000,0000,,all in one line because i don't need to have some variables it stores the button Dialogue: 0,0:07:29.00,0:07:35.00,Default,,0000,0000,0000,,because down here i'd i need to check for the source of Dialogue: 0,0:07:35.00,0:07:35.00,Default,,0000,0000,0000,,what that action and that was Dialogue: 0,0:07:35.00,0:07:37.00,Default,,0000,0000,0000,,i'm going to have a safe action event Dialogue: 0,0:07:37.00,0:07:39.00,Default,,0000,0000,0000,,give me your command Dialogue: 0,0:07:39.00,0:07:41.00,Default,,0000,0000,0000,,and the command is going to be the name of the button Dialogue: 0,0:07:41.00,0:07:45.00,Default,,0000,0000,0000,,so i no longer need a variable to actually store a reference to the actual Dialogue: 0,0:07:45.00,0:07:47.00,Default,,0000,0000,0000,,button object Dialogue: 0,0:07:47.00,0:07:51.00,Default,,0000,0000,0000,,because this is going to give me the name whenever i needed and so as a Dialogue: 0,0:07:51.00,0:07:53.00,Default,,0000,0000,0000,,result notice your i don't have an instance variable Dialogue: 0,0:07:53.00,0:07:56.00,Default,,0000,0000,0000,,so this is one of those things that's a trade-off it also should give you a Dialogue: 0,0:07:56.00,0:07:59.00,Default,,0000,0000,0000,,little bit more insight into when you have instance variables were so when you Dialogue: 0,0:07:59.00,0:08:00.00,Default,,0000,0000,0000,,don't have instance variables Dialogue: 0,0:08:00.00,0:08:02.00,Default,,0000,0000,0000,,you need to have the instance variable Dialogue: 0,0:08:02.00,0:08:08.00,Default,,0000,0000,0000,,in the case Dialogue: 0,0:08:08.00,0:08:11.00,Default,,0000,0000,0000,,where you need to have Dialogue: 0,0:08:11.00,0:08:12.00,Default,,0000,0000,0000,,and i want the new one Dialogue: 0,0:08:12.00,0:08:13.00,Default,,0000,0000,0000,,you want the instance variable in the case where Dialogue: 0,0:08:13.00,0:08:15.00,Default,,0000,0000,0000,,you want to be able to refer to this variable Dialogue: 0,0:08:15.00,0:08:17.00,Default,,0000,0000,0000,,in some method Dialogue: 0,0:08:17.00,0:08:21.00,Default,,0000,0000,0000,,it's different then perhaps the method which got created right so i created i Dialogue: 0,0:08:21.00,0:08:23.00,Default,,0000,0000,0000,,created the button over here and start somewhere Dialogue: 0,0:08:23.00,0:08:26.00,Default,,0000,0000,0000,,but i need to be able to refer to and some other method so it's got to be an Dialogue: 0,0:08:26.00,0:08:27.00,Default,,0000,0000,0000,,instance variable Dialogue: 0,0:08:27.00,0:08:34.00,Default,,0000,0000,0000,,if i don't need to refer to any other method which is what i saw on the second Dialogue: 0,0:08:34.00,0:08:35.00,Default,,0000,0000,0000,,place Dialogue: 0,0:08:35.00,0:08:36.00,Default,,0000,0000,0000,,i don't need to report would again here is a matter fact there's no other place Dialogue: 0,0:08:36.00,0:08:41.00,Default,,0000,0000,0000,,i need to refer to it after i created then i don't need distorting Dialogue: 0,0:08:41.00,0:08:52.00,Default,,0000,0000,0000,,and questions about her Dialogue: 0,0:08:52.00,0:08:57.00,Default,,0000,0000,0000,,was so that's about the neurological at the computer shouldn't try to figure out Dialogue: 0,0:08:57.00,0:08:59.00,Default,,0000,0000,0000,,which one could if you give it to bond with the same name Dialogue: 0,0:08:59.00,0:09:01.00,Default,,0000,0000,0000,,i have no idea Dialogue: 0,0:09:01.00,0:09:07.00,Default,,0000,0000,0000,,right and it's going to cause you problems they don't do it if you want to Dialogue: 0,0:09:07.00,0:09:08.00,Default,,0000,0000,0000,,see what happens go ahead and dry bread it's a bug in logic not about and what Dialogue: 0,0:09:08.00,0:09:09.00,Default,,0000,0000,0000,,the computers executing Dialogue: 0,0:09:09.00,0:09:19.00,Default,,0000,0000,0000,,any other questions are gone Dialogue: 0,0:09:19.00,0:09:21.00,Default,,0000,0000,0000,,up it's not going to get the actual button so Dialogue: 0,0:09:21.00,0:09:25.00,Default,,0000,0000,0000,,you're saying in this other case ever here Dialogue: 0,0:09:25.00,0:09:29.00,Default,,0000,0000,0000,,what is this thing going to return if i didn't create a variable over here Dialogue: 0,0:09:29.00,0:09:32.00,Default,,0000,0000,0000,,this thing starting to return some reference to your object Dialogue: 0,0:09:32.00,0:09:35.00,Default,,0000,0000,0000,,the only issue for you now though is you have no way of checking for equality Dialogue: 0,0:09:35.00,0:09:39.00,Default,,0000,0000,0000,,with some object right as you know if you don't have the same instance Dialogue: 0,0:09:39.00,0:09:42.00,Default,,0000,0000,0000,,variable you can check to see if that things equal the high button so if you Dialogue: 0,0:09:42.00,0:09:46.00,Default,,0000,0000,0000,,created high button over here just immediately added it never kept track of Dialogue: 0,0:09:46.00,0:09:46.00,Default,,0000,0000,0000,,it over here Dialogue: 0,0:09:46.00,0:09:48.00,Default,,0000,0000,0000,,this guy would return to you Dialogue: 0,0:09:48.00,9:59:59.99,Default,,0000,0000,0000,,a pointer too high but menu take right i got appointed a high button how do you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,know it's high button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you don't because you have no way of comparing it to the actual hot button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,created Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and that's why we need to work Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so why do i show these to differ quite of doing it the reason why i say these Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,two different ways of doing it is now you're actually make use of this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,with respect to some other interact or is the tracks and see where we care Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,about doing debt source as opposed to you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the uh... action plan Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what we're gonna do next Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is going to say you know allot of times and programs that you really want to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,have if you want to have some way of letting the user specified Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,some taxed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,in a program that's running interactively that's not consul right Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,they'd like to be able to type something and so let me just show you example of Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,dvd buchanan Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so you have a program that's got what we refer to as a text feel down here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i call that name and so if i say hey my name is maryland Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it says hello maryland Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then i say are not and i was joking my name is really sally Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,most of you don't know this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,as as a hollow sally right so it's just some way of being able to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,have some taxes Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,field over here that the user fails and in the senate interact a right this is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,just one fields dot on the console Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then do some action in the action we have to do here is to write something Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the console Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that makes use of the tax that the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the use your actually typed in Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so how do we get something like that to work Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what we need to do is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,av and interact with it's called the text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and basically text field is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is just epping use alright it's a little place where someone can type some text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,isn't interact or such as if it under control bars Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then potentially one make it enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you get some action event that tells you unique actually or if you want you can Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,do something with this text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so that's the basic idea what you really get is a box and that's all you get with Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it if you want to add a label to that box like the added name over here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we need to sort of specified that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i'll show you how to do that in just a second but what you're really get at Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the box in a new types in something Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then hits began turkey then potentially some of them is generated Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,for you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so how does that actually set up so the thing we want to create is called e{\u1}j{\u0} Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,text field ok it's just another one of these interact or just like you saw Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,before we had checkboxes in combo boxes and all that stuff it's just called it a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,off named this twenty ab Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to stand for text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and what you do when you trade and you want to be easy to use a new g tax to be Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,loved and what you've given as a parameter here's the funky thing Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you don't give it its label Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the label doesn't come with the tax till you need to create the label separately Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what you give it is the size of that text feel how big it should be in terms Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of the maximum number of characters that would show up in their so if we say ten Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,for example you're saying is i want to have some text you'll get a hold almost Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,ten characters and if you some font that's variable with it automatically Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,gives you the size of like ten ends kazan is the widest character in case Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you didn't know that's just life in the city Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,now the funny thing about this right were let relative to add this action Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,performed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is one the user hits answer Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,if i didn't do anything else you would not actually get this call to action Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,performed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we'll because action performed only called for you for buttons Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what you need to do is after you actually create this text field you need Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to say hey you know what Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i need to let you know about this text field add something that can generate Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,actions and so the way you do this is a looks a little bit funky Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,would you tell the tax field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,not and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,action listeners Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,bits to pay Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you don't need to worry about all that blood is that actually mean at a very Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,low level all you need to know if you're telling Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,hey guess what Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you're going to be able to generate actions now and the thing that you're Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,going to let people know when you generate some actions is yourself which Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is why we pass this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but anytime you create excel the youngest do this once for all text of Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the via multiple text fields Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you need to send this add action listener this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,message Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,each one independently we only have one year so we only need to do it once here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but what this basically gaza says Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,auto text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that you can now generate these action events as well Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so after you created any sort of set up this line and you would want to add it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,some more inter program write to someone your program you would probably say Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,bad Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,kidnapped and we might add ginsburg's ample in the south as we had everything Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,in the south Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,when someone takes something and it's yep and hits internet will generate some Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,call to action event for prefer action performed pasternak shanavas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,once that gets set up Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,how do you actually say grout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what was the text field that generated this about right because you could have Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,multiple text feels that someone could have typed into it hit the enter key Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what you're doing teary-eyed use your friend if you just dot me dot get sore Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so inside here which are to say is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,he died gets worse Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is people equal to so yeah Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and at this point all kinds of warning bells should go out for you and so maybe Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,inside here you won't be something like you want to print len Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,where you want to say hi and then add to it the tax that's in that text box in Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the way you do that as you just say the name of whatever the text field is and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the message you sended is get taxed and what it will give you back Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,act is it will just returned to you this thing by it's not just returns a string Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of whatever's in that box on the user enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so that's all right out hike and then whatever text they type in just like you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,saw on the program except that was writing hello Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and maybe that's what we want to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but the warning bells it should be going off now what's the problem if i've just Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,written the code like this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's not an instance variable writes i have no way if this is my payment method Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,over here i have no way of being able to report that's me up again Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,out here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so i need to create the instance variable right if this is my new method Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,public void in eight in front of him Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what i need to do is this year somewhere else in my class let's say over here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is where i declare my art bar's right which is just lower down in the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,class umar Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i need to actually have prided Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,jamie Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,packs Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,grossly out and then over here rather than declaring it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'd just create the new thier so i need to set it up with an instance variable Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,okay just like this on the example of the button same kind of thing that's Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,going on here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,except the surtax feels Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so let me show you an example of this code inaction Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so here's a little text field example what i want to do is i'm going to create Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,next and the consul program some so i don't have a console Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,in my hand nick i'm going to have Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,something called name field what's name field it's just a private j text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,right it's an instance variable so i can save off name field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,name field i a nationwide over here to be some new jerry text field of site and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,write is exactly what i just saw over there Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,now when i also want to do here is the one actor funk innocent program i want Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to give that box a label so before i add this box to my control bar Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm gonna adding new jail able with jess says names all j label does it just says Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,hey i'm going to create something that's just this name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or just this particular these attacks attacks happens to be named and i'm Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,going to add Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to my southern control bar Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so forth it's just going to write name out there and then after i write name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm going to add to my name field which is going to create the box after name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then i'm going to show you you know i'm going to do exactly what i told you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,where you have to tell me name field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you're going to add action listeners of yourself Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so that if you do anything Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you're going to let Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,someone else know that you actually have done some action when the user tight Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,since you would please enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that means action performed is going to get called for you because now you're Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,going to be able to generate events to an action listener Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and inaction performed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we check you don't get source we can compare against name field 'cause we Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,have that saved up down here is an instance variable Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and will just right out hello and then the text assisted with name field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and money Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,increase the tax eyes here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,just so it's a little bit bigger and we can all see what's actually going on set Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,for one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of the wild favorite career twenty four Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,aquino na make a bigger Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yeah the asset just in case victor Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so here once again they're on Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,hello marilyn c and one in those it's getting a bit like it in a row right Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,enter entertainer entertainers that exerc entertainer Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's another one of things it's only so much fun Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,trying to sell these were scroll emerge from one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,not a lot of time going on their why does this gap of about two minutes maybe Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so we can do it we can go ahead and do it this way now you can get information Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,pentax box Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,any questions about text box Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,behind the back Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yeah so basically the way layout works is every time you add things they just Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,get added sequentially from left to right in whichever region you're adding Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,them to in this case the southern region and the whole set of stuff gets honored Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so if you want to space stuff out which actually need to do our ad for example Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,more more j labels that might have to spaces in the mental creates more space Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,between stuff and there's no economic are just leave it here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,ikea Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so here's what i think india that's kinda funky is we can actually name of Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you might say but maryland this won't get source thing yeah yeah keep around Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the instance there but i'm not so keen on that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what i am comwork you not is giving things name so i can just refer to them Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,by their name inside ok thats cool you can you can have a name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so here that exact same example just slightly differently what i want to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is on the air Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,had just one more line here so this is exactly the same code i had before Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,except after i create the name field i say hey name field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i want to give you an action need Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and that were an action command and your action command is going to be name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so whenever you generate these events yeah i can check to see if your sources Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,actually but the source of that event is you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or if i've given you a name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i can do the same thing i just did with buttons which is down here i can get Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,action command that gives me the string which is the name of the object the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,created this event Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i can see if it's equal to name which is the name that i gave it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so that's just showed you a little back and forth with buttons i kinda showed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you got for it with buttons you just need them cuz you always name buttons Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,will check against names Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but you could actually Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,check against the source of the button if you want to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,gatech still just kinda backwards j text field you always Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,in some sense have the tax field that you can get with debt source but if you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,want to report will by name you have to explicitly given name because name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,doesn't show up as part of it right if we want the label we still need to add Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the separate label name over here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this is just naming the particular events that come from that box that's Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,all it does Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,answer any questions about them Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,at the max max shows Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,oss Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yen named feel the stand i've are here it's really actually no longer necessary Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,cuz i don't need to refer to it over here so if i wanted to make it just is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,deep sting little campaigns spank sidebars thanks for playing that's real Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,nice of you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and everything's Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,although i can't Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's why i did in here cause i still need to refer to it over here to get its Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what i could to be honest actually what i could do is i could just Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,call you get source here and get it source and get it stacks i really don't Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,need to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but it is better stock that makes it clear that i'm getting the texture so Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,there is a way around it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but the cleaner ways to actually do it this way Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,already Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,get rid of the declaration Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's like c Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,sang questions about that j text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,uh... yeah Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,on weekends Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i'll show you that no about twenty minutes Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but hand free seats away so before we get there Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's not something completely different Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i think it's completely different is this a how to get to the question in the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,back of the room which is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and they're on these things are all sort of showing up centered on the bottom of Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the screen cut i actually have these enter actor is laid out a different way Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,than this way that they're getting laid out for me and in fact you can and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,strangely enough the thing you used to do that is called a layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so i'll let you know controls the layout a particular interactions now it turns Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,out when you use your friendly console program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or your friend of the graphics program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what you got was a layout was called the border layouts and he was a matter of Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,fact artists on the border layouts Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you saw the boarder layout last time it looked like this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is you had some cena region you had a north south east and west borders Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is why this thing called a border layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and what you Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what happened with that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what happened with this border layouts Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,powerpoint wants comply Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it at the center was were all the action takes place Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the console program would add a console to the sensor automatically right that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is what happens in a consul program and a graphics program would added g canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to the center automatically which is what you're going to draw your stuff Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and the other regions are only visible if you add stuff to them so in the very Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,early days when you had a graphics program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that was all just graphics you would say hey mera nothing showed up at is the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,self region Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yeah 'cause we didn't put any interact or if they are so Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,these enter actor region's only show up if we actually put in a raptor on Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,rightly said these are referred to as control bar say saudis last time Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so how do i consider different kinds of layouts so there's a couple of other Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,layout also think about their something called a greed layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and and the land grant layout works is you actually creighton object called Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,agreed to lay out and you specify inaccurate lay out how many rows and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,columns are in the great layout so Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we might take you rosen three columns which means we're going to have a laying Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,out the look something like this is just a grade with two rooms in three columns Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i say that the code for this in just two seconds and then the nitty-gritty Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,details Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but conceptually here's what it is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,now when i had i'd ims so what i do as i say hey you know what i want to set my Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,layout to leave is great layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what now happens when i had i done is is it will add items the items being the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,interact urs Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,one-by-one starting at the top most role in the leftmost center in the last most Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,square Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and every time i add a new element it moved over by one until i get to the end Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of the row and then it automatically comes down so go sequentially across row Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,by roe Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but allows me to contemplate things that may grade Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,if i want to actually be able to do things and agreed so let me show you an Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,example of what a grid layout might look like Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,world on with you lou died Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so great layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,here's a simple program it has a great layout what we do is we start off Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,inordinate method by saying Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,hey you know what i want to create a layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so i want to set the existing layout that the program is going to use to be a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,new grid layout that's to come at three to rose by three columns Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,now one thing that's interesting about this program if you look at great layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,example Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it does not extend consul program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it does not extend graphics program these are not expiry of four house and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's beautiful life and it's beautiful children Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what have i done Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what i've done is set i'm just going to extend the program i don't want you to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,create a console for me and i don't want you to create a g canvas for me Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,cuz i want to take up the whole story with my barnes baby Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so that's what i'm gonna do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,almanac Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,six new buttons and these bonds are just going to get sequentially ad in the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,order you just saw and then i'm not saying a tad weiss action listeners Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i'm not going to do anything understanding or the buttons but what i Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,really the reason why i'm doing this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is i just want to see some big fab but Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,on the air like that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,six buttons that take up to the whole scream Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's a good Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,my enter actors filled up the graded Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the layout takes up as much space as possible in the screen and more Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,importantly each of the interac yours that i put into agreed cell takes up as Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,much cell as much space and the cell as possible so there's one comes along and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,says Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,all yeah i got so much space on lay down your likely why why do you do this is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the most bring everything ever i don't hahahaha Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,lying Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,didn't have any plan that separately Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,driving everyone talk about a right now Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,maybe afterwards Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,such as frightening as like avnet sound effects got Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,check this out as i resize the window all bein small uncw big buttons Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's why we Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,have layout managers because the layout manager just gives conceptually says Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this is how your layouts going to be Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and it says i'm going to handle all the dynamics of resizing and all that stuff Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,for u{\u1}p{\u0}s_ people resize the window Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but i need to know how things are laid out and if you give me more space Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,then i need to understand the take it out Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,great layout not so useful page or something to seize taken if you see in Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the book you know it's talking about Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,there's another kind of layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is called a table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so that's another kind of lay out all the flow layout when i can talk about it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,all Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but there's something called a table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,any table layout is basically just like agreed layout except for the niceties so Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you also give it a number of rows and columns Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,except where it says is rather than having each one of the interact urs fill Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,up itself a maximum possible size Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm just going to give that enter actor as much space is it needs in that cell Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and no more Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what does that mean Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that means if i come in here rather than a grid layout i say i want to create a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,new table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i run this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,co-ordinate add more imports Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,are a little guide Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i mean just grab the imports from over here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,me Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you happy Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of graphics sorry Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,come on table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,though table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,let me just show you the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,nice for example it cable Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,didi Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,sometimes in life Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,he just got to get on with it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we got ugly with it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,there's table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,six button still Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we can spell resize the window but the button there just given as much sizes Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,they would actually need they don't fill up the whole Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,region of the actually ma Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,table layout such something slightly more useful for us than great layout to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the question came up before which was Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,hey can i actually link like buttons and text fields together Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to create something a little bit more funky and in fact i can do that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,initially that any context outside something aloo bit more interesting Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is a program that allows for conversion in temperature so this one's Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,actually in the books i didn't give me the code because although Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,cody is actually a the coated on the books i didn't get a chance ever handout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,they say it is where i got a label called degrees fahrenheit a label called Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,degrees celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and inside here we can type in some value and if we click fahrenheit to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it will automatically oil Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,fill in the southeast field of course one value separately to is zero celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the other thing that's kinda funky if i don't necessarily have to click the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,button i can type in say some value and hit enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and that's just like Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,clicking the button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,interesting so how do i create this program well if you think about this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,program first i'm going to need is these things are not supersized but they're Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,all laid out in a grade so i'm going to need a table layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that has to rosen three columns Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the first Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,element that i have here is just the label that i'm going to have a field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that the text field as a matter fact i have a specialized kind of text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,owners to specialize context field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,something called the into field and a double field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,they work just like text fields except you're guaranteed to get an integer Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,value were double value from the menu mighty but now and what happens if Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,someone types and and wants to come for a twitter butcher Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i clicked the wrong button they want to convert age were temperature Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it says an internet injuring two brings up this pop-up box and gets in their Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,face and say oh yeah sorry my bad Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so guarantees you get a major Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then i'm going to have a button and somehow i want to link the button and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the tax bills to do the same action Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so let me show you the car for that it's actually a lot shorter than it looks Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,like Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,first thing to do is a case at the layout to be a table layout notice once Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,again here i am extending a program 'cause i don't want to console or canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,created for me Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i want to be able to specify the whole layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so i'm just extending a program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i say set the layout to be a table layout to come in three Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and again we're going to go sequentially through all the elements of what i want Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to have in the first Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,element Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,basically the first thing i want to add to my layout i don't specify intel down Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,here the very first thing to add to my layout is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,degrees fahrenheit as a label Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,then i'm going to add some fahrenheit field what how did i create that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,fahrenheit field actually created it up here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what i did Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,first was declaring it as an instance variable so fahrenheit field isn't ants Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,field not agape text field that you feel which is just a specialization of eighty Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,eight ext field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to just give you back a major other than that it works just like a text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,except drugs one show you any feel totally feel Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so i created new and field i specified financial value not its initial sides Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but its initial value Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,its initial value is thirty two Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,then when i say is hey fahrenheit field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm going to set your action command Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so that when you generate actions the name associated with the actions that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you generate Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is going to be af Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,dash greater than which we can just think of as a rogue c Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's going to be your name so i said its name and i say you're going to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,generate action events Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,someone adn action listener g love yourself Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,okay just like you sabi for the text helix up now we're going with an infield Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we do exactly that same thing with something called the southeast feel Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,tells his films also declared to be an infield Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it starts off the national volume zero we set it's action command to bc goes to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,ap as opposed to ap goes to see so we give it a slide a different name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and we also set yet to listen to action events Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,okay or did generate action events Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then we're going to lay out our great so first element of the great is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the label as we talked about before Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,next element of our great is our little text box that's going to actually have Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the numeric value in it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and last elements of our great on the first of all of the greatest Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is a button that's name is bath goes to see Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and you look at this and you say hey marron if i have a button its name is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,apt goes to see and i named this guy af goes to see Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,aren't i getting back to the previous point over here of whether that's the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,logical problem where i actually have two elements that have the same name Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yeah bday i have to always have the same name but i want to do exactly the same Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,thing in both cases so it doesn't make a difference Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what i want to do is say someone clicks the button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm going to do the conversion so i'm going to have some kind of those who do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the conversion Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,if someone type something in the text field it hits enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm going to do the same thing Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so this is something you see a lot of times on the web where for example if Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,there's a search engine you use you type in the search engine then click search Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or you can just take enter how many people actually click the search button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,no one how many people just and hit enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yet isn't it nice that you can just hit enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's the same thing we're doing in this program which is why we went Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,through the extra rigmarole of setting this action command here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,'cause sometimes it's just nice to hear and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and we do exactly the same thing for the grease celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the name that was so we add that labeled degree celsius we had the southeast Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,field and then we create a new button whose name is the same as the action Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,command for the celsius field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then we add action listeners that sets up our entire user interface or Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,entire graphical user interface and a good week Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then when the user clicks on a button we say hey Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,let me get the action command if the action commands f goes to see which Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,means you are they type something in the fahrenheit field and hit enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,or they click the button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,then i'll get the value in the hair fahrenheit field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,because fahrenheit field integer field i just always gives me back in a major Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i do a little bit of math if you don't know the map conversion from Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,fahrenheit the celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,don't worry about it this is just how you convert from fahrenheit celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you taking nine fifth times the fahrenheit value minus thirty two and i Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,give you the celtics value now you know Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what i do more interestingly if i set the value in the celsius field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to be whatever value i computed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so someone just type something into the fahrenheit feel that he enter or click Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the f{\u1}t{\u0}c_ button Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but in what i do to update the screen is ice change whatever values in the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,celsius field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i destroy the receptacle of that or i should say that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,compliment reciprocal the inverse the mirror image how many words can you come Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,up for the same thing Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of that if someone does see dat Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which is i get the value that's in the celsius field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i do the map it's necessary to convert herself if the fahrenheit nice at the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,fair field and that's the whole program right here is my instant variables Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so if i run Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,my little temperature program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i have my label Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i have my initial value and i have my fahrenheit to celsius and if i put in Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,some value here like a hundred degrees fahrenheit Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is thirty eight degrees celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and two hundred twelve degrees fahrenheit will not touch the mouse just Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,hit on me in turkey Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,uh... an er does the same thing is if i click the mouse and same thing on the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,second phase zero celsius Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the actor into good times and not created a whole program of the graphical Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,user interface and i'd like to resize and it just doesn't know a lot always Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,centers for me is not nice if i make it east mall Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,while these things don't get too small just sent a i can see the screen that's Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what the state Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,any questions about that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,how can use the mikes please Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i gotta keep reminding everyone views the microphones Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,p Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but you can look really good Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,uh... there are ways the with table layout you can actually get it whatever Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,fortuitous at hands Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to actually specify different sizes for things and i just didn't do that here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's in the book if you want to do a but we're not going to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,try to push it out for in this class use it but there are ways you can Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so one final thing that we want to do is you might say all this is all good well Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,mirror on yeah i'm not kind of fun but Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,really what i like to some text in some graphics together and i want to interact Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,recycle wanted all right Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i want tax taiwan wrapped on interactive you think back to busy rethinking man Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,hangman you had texting had graphics Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but she didn't have interacted Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,here you have interact there is and i show you example interact arisen tax Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,twenty click the button and said hi and you know Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,gave your name or whatever now it's time to roll the enchilada and put them all Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,together in our friend Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,text and graphics Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what text and graphics is going to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is it basically what we want to think about is having some consul in the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and the graphics canvas in the program and interact or is in the program so we Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,can just go to town and do whatever you want to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,how do we make this happen Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,first thing we're going to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you had a little bit text on the board just to get out there a little Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,blood circulating in your legs and i know nothing about blood clots in your Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,legs where you're actually traveling too long on planes and blood clot Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yeah we want to talk about that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i didn't give you a small hands of a save your life beverage traveling on a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,trip is longer than two hours sometime during the trip or multiple times get up Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and walk around Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it will save your life Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but nigger ever giving a lecture for longer than two hours Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,get up and walk around it'll save your life to not be the blood clots but Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,because your students would tell you have to drive you just sitting there Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,going like all i know not good bread that layout were which we're not going Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to get into it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,but is it accidentally so text and graphics Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,she retains the taste great together Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you can decide which ones chocolate and which ones peanut butter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,lettuce text and graphics and so it's like hangman but with interactives Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what we're going to do is we're going to extend consul program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and the reason why we're going to extend the consul program he's we still need Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,our plan the console that's what we're going to get the text portion of doing Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this interaction Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's from having the consul program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and so what we have a console program what please give this is it gives us Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the borders Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that we've come to know when law writing gives us the north border in the south Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,border and western he's and these are places where we can still play so enter Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,actors Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the interesting thing is what's going on in the center region Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and what i told you before the consul program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,fills up the senate region with a place where you can put text and that's all Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you can do with it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what we're going to say it a consul program what i want to do is in the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,center regent i want to give you a different layout and put stuff in that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,lady out Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,second potentially have some text in some graphic Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,uh... Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what am i going to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the first thing i want to do is i'm going to think about having some layouts Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,okay mine layouts going applied to this middle region Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the important thing to keep in mind as the console program what used to be was Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,created console the filled up the entire region Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,now what i'm going to get is a console as my first elements Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which means however i do the layout whatever i do and that lay out the very Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,first thing like what i have a great that has three elements to it one row Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the first elements of that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,will be my consul Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that you don't have any control over just because of the way the consul Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,program works the first elements of whatever layout you used when you extend Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the consul program create a layout for wall waise bhi your whatever your text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,now you said hey Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,there on your awesome tell me about graphics but if i'm doing with the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,consul program how do i get graphics Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we give a little trick we did in hangman which is there's this thing called the g Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,candidates Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and what we're going to do is create agee kandicn digi cam this importantly Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,is actually something that we can add to a linux Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what i can do is say hey crave my consul program i'm going to create some Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,layout but sam i have a great that's Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm going to create some sort of way out like maybe i have agreed me out Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,one comment three Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which would give me dressed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i know that my first things i think up my my console what i want to do is Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,creepy g canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and ad that you can visit is my second elements Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and just to be super cool to give you something that normally you'd have to Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,pay twelve ninety five four but i want to get at you for for Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,we're going to create another g hands and added over here so that she can this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,bills Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what we get is consul and to different g canvases Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,plus we can still add interac result round or screen Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,at this point you should be looking at this and shock horror and delight and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,going Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,okay marron let's all put it together and five minutes because it's just that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,he Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so here's how it works Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,text and graphics ike's ten console program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,okay 'cause that's going to get my consul Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,in miami i say set the layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,on one new grid layout remember great layout the elements of the great layout Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,expand to take how much space you give them Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's what i want in this case Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,because what i want to say as i want to have a great i want to give the consul Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,one-third of the whole grade and cute and this is another third of those Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,grades and grown too is large as they can be Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,then i'm going to do is i'm going to create to canvass so i need to have some Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,instance variables to refer to these canvases Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i am i have to canvases Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which are just type is g canvas by private labels i will call them the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,right canvas and the left hand yes Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,animals have a text field in this program just for laughs just cuz i can Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and that's going to be one of my characters so i want to have interact Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,respect graph Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,what am i going to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,first thing to do it on to say that left canvas create a new canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that can viz Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and when i do this add it's adding it to my laid out Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,ham adding a whole candid so what is that do it says hey told me got a great Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,layout here ive already filled in the first thing with the console 'cause Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's what i do on the console program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you just told me to add a canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,element number two will be the canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i do the same thing again for white canvas element number three is not the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,right and so i have to big canvasses on there as the second and third elements Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of my grade Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i got a console Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,grid canvas tents not going to add to interact with because it's just that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,cool i'm going to create a text field which they knew gatech steel text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i declared as a private instance variable i just showed you that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,maximum size is ten Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i will add a label to it and the label just going to be called some text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,sold the rights some tax Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,in the southern region Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that'll adam i text field in the southern region and that ads at this Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,point you should come to know involved you always gotta remember to add your Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,action list are very common thing that happens people create a text field and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,their type in an end stuff in the program enough things happening in their Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,tearing their hair and they're wondering why Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,they just forgot to add the action list you know it learn it live it probably Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it's a good time Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,action listener for your text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and then i would have to buttons just for good times so i have my tech said Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm gonna have to more buttons a button that says draw on the left Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and a button that says draw on the right Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so i mean show you what all these things are going to do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,before i show you the rest of the program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so what i want to show you text and graphics Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,uh... Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,out my consolation Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i have to you can see them but they are side by side q different canvas windows Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,over here here's some text i can type in high Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you typed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,while Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that exciting Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,drama left in my left hand that some just run rectangles offsite i do that Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,just a second Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,draw a right Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,drawing in my right candidates Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,how did i make that happen alright on your share of the programme so i've set Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,everything up right console to canvases Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,text field and two buttons at the bottom Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,here is where all the actions going on when action performed is called right i Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,mean someone's interacting with one of the interact urs there's nothing else i Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,can do in the program except interact with one of the inner actors Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,first a check for the text field if the interaction with the text field so if Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the source of the interaction with the text field i write about you typed and Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the text of the text field this will go into the consul biggest anytime you do Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,applicable in the text always goes in the consul so it just shows up in the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,consul not a whole lot exciting going on there Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,alternatively if the thing they did was not stipe into the text field Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,they clicked one of the bottoms so i say hey i'm showing i could've been there Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,done all with get sore throat always get action command Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i'm using both just to show you that you can mix and match if you want Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so i say hey what was the command get action command Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,if it was drawl left then what i want to do is i'm going to create a new field a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,rectangle let me show you create new filled rectangle it's very simple Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it just Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,creates a rectangle that's fifty by twenty and yes they should have been Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,constant i didn't make them conference i wouldn't have to scroll down and show Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,you the constant Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,i said to be filled Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i return the rectangle solid does is create a filled rectangle on say hey Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,your ego Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and although i do is i take that filled rectangle and i added Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,to my left hand dates Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so because that's not a graphics program i can just a tad with the rectangle one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,added if i want to add the rectangle somewhere i need to specify which canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,of my adding a few i'm adding it's the left campus i{\u1}c{\u0}a{\u1}o{\u0} left hand this ads Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,yourself this rectangle where you can add it x location twenty and at one Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,location left y Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,left wide starts out with the value ten Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and every time i add something i'd space down my wife's i'm just making wide go Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,down to buy some spacer mt which is thirty so i was doing is trying a Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,rectangle and essentially moving down toward drachmir x next rectangle below Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it moving down to draw the next rectangle below it Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i do exactly the same thing for the right hand side Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,except after a quick quick filled rectangle i have a separate whitewater Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,which keeps track of how low of gotten on that side in terms of the white ford Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,net Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and i add to the right canvas Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,that's the only difference Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so when i run this program Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,right some text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,right again if i type and great Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,by typing great Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,and hit enter it generates the event which does the sprint lynn on the screen Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,right it generates this event over here this action performed Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,the source was text field and i write out the text on the screen Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,if i click on one of the buttons drama apt Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,draws the filled rectangle and its incremented the why on the left hand Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,side for next time i clicked route left Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,it draws at lower and lower and lower and dry right does the same thing Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,notice of the x location for both Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,this canvas and this can this when i had the rectangles are both a twenty the Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,reason why it shows up to a different place in the screen is because they're Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,two different and this is in those kind of invisible border here Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,so you can create cameron text Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,graphics and interactive altogether and just go to town any questions Dialogue: 0,9:59:59.99,9:59:59.99,Default,,0000,0000,0000,,all right and i will see you on wednesday