TABS and HOW to USE them
does anyone know how to make basic tabs?
oh hey how are you doing?
oh..i scraped some of my other idea for now im into tabs
awesome. thats solid. real maxed out turbo.
have i used tabs? no way. you put them on your tongue and they make you crazy. real berkeley. you know what i mean.
so how are you doing? doing alright?
oh lol so i guess ur the master with tabs think u can show me how to mak one basic one?
yeah im doing good thanks
yea youre right. things are getting crazy in here.
It would be easier to answer your questions if you weren't insane.
Tabs are just characters. You represent the tab with the "\t" escape. For example, this prints a tab to standard output:
System.out.print("\t");
However, that code is pretty much worthless. Your question is about something so trivial that you're either completely incompetent, or more likely, you're not describing your actual issue very well.
Tabs are used to make columned output on a plain terminal, or as a possible separator between fields in a textual data file. In the olden days, back when I was using Perl 4, we used tabs a lot to make data structures beyond that which Perl4 could otherwise easily handle, but Perl5 has made that unnecessary. You don't use tabs a whole lot in Java because you have much better ways to create complex data structures, and you tend not to use tab-delimited files much in Java, although I suppose it happens occasionally.
lmao yup...so will u help me with tabs please?
who's that paul guy? you wanna hang out?
that paul guy keeps talking about pearls. you ever go to the beach?
all i want is a tab bar with 1 tab on it lol
@hello.everyone: I have already given you all the help with tabs that you can plausibly need, at least with the question as you have stated it.@TuringPest: Sure, dude. Beats working.
i know a good bar too. you ever try shasta? its better than tabs i think.
> all i want is a tab bar with 1 tab on it lolDo you mean you want a GUI widget that displays multiple screens of information, in which the user selects the screen by selecting a tab from one or more rows of tabs?
Do they sell Shasta outside of California?
paul youre a cool guy. but stop trying to hypnotize me.
yes that exactly what i want
do u have any old coding wih it?
Then that's what you should have asked, instead of wasting everyone's time with vagueness.
Also you should probably have asked on a forum about GUIs, like the Swing forum.
There's a Swing widget called JTabbedPane. Here's a tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/components/tabbedpane.html
Any further questions about that class should be asked on the Swing forum.
May I also suggest waiting until the drugs wear off before trying to program again.
you can put the stamps on the screen. you know?
can u right me a simple tab code
System.out.print(Tabs.getTab());
other class called Tab
public static String getTab() {
return getOtherTab();
}
private static String getOtherTab() {
return getOtherOtherTab();
}
private static String getOtherOtherTab() {
return "\t";
}
TuringPest, are you alright?
im fairly new to java that stuff means nothing to me
can someone just give me the real code for tabbed pane and then if u guys need anything im here for u guys please and most appreciated thankyou
> im fairly new to java that stuff means nothing to meWell then it sounds like you need to start at the beginning. http://java.sun.com/docs/books/tutorial/getStarted/index.html
> can someone just give me the real code for tabbed> pane and then if u guys need anything im here for u> guys please and most appreciated thankyouOOOOOOOOOOOOOOHHH......You wanted help with a tabbed PANE...Well why didn't you say so?
what did u think i needed help with lmao sry bro
> what did u think i needed help with lmao sry broIt seems that TuringPest, Paul, and I all thought you were talking about the tab character.
lmao not im not talking about my tab key on my keyboard lmao
public class new2 extends JPanel {
public new2() {
setLayout(new BorderLayout());
JTabbedPane tabbedPane = new JTabbedPane();
String tabs[] = { "One" };
for (int i = 0; i < tabs.length; i++) {
tabbedPane.addTab(tabs[i], createPane(tabs[i]));
}
add(tabbedPane, BorderLayout.CENTER);
}
JPanel createPane(String s) {
JPanel p = new JPanel();
return p;
}
public static void main(String[] args) {
JFrame frame = new JFrame("");
frame.addWindowListener(new WindowAdapter() {
{
}
});
frame.getContentPane().add(new new2());
frame.setSize(200, 100);
frame.setVisible(true);
}
}
i made that but it has no content pane so i cant add things to it
do u no how i can put buttons and stuff on that page?
you guys are real chill. you wanna jam?
i have buttons from every state. what kind of buttons do you have?
i have 2 days to finish this project wil someone please help me out?
> It seems that TuringPest, Paul, and I all thought you were talking about the tab character.are you the captain of a ship? i said tabs are a pane. i think that was foreshadowing. you know taoism?
i will. youre like a brother to me.
It appears that you can add any kind of component you like to a tabbed pane's internal panels. So if you want to add a single button, then add a button. If you want to add multiple things to a single tabbed pane's internal panel, then create and add a panel and then add things to that panel.
Anyway, didn't I tell you to ask on the Swing forum?
paul, we learn more from asking not telling.
> i have 2 days to finish this project wil someone> please help me out?You're getting far more help than you deserve. You're barely putting any effort into this at all, apparently.
h.e that was very profound.
cuz there not helping me alot there saying things like butons from each state
what is the state of where you are putting the buttons. answer me this.
You're not even putting in the effort to form complete sentences, to spell words out entirely ("cuz" != "because") or to choose the correct words among homonyms ("there" != "they're").
Anyway, here's a simple example I was able to throw together in a couple minutes using the amazing technique of reading the f'*** documentation.
import javax.swing.*;
public class TestTabbedPane {
public static void main(String[] argv) {
JFrame f = new JFrame();
JTabbedPane jtp = new JTabbedPane();
f.getContentPane().add(jtp);
jtp.add("Monkey", new JLabel("bobo"));
jtp.add("Horse", new JLabel("man'o'war"));
JPanel m = new JPanel();
jtp.add("Other", m);
m.add(new JLabel("label number one"));
m.add(new JLabel("label number two"));
f.pack();
f.setVisible(true);
}
}
Does that help, lazy-bones?
you need a hug man. im sad my brother is in this mindset.
> ur really annoyingYou were already told to read the tutorial on JTabbedPane's and to post in the Swing forum. You failed to follow both of those.
yea but what happens when we follow someone who fails? this is worse.
> you need a hug man...Dude, I think you need to lay off the acid. ;-)
I thank you very much for helping me.
border1.setForeground(Color.cyan);
cannot find symbol method setForeground(java.awt.Color)
[url= http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html#setForeground(java.awt.Color)]relevant?[/url]
its like we're a day older.
> thats a factGeneral Barnicke: Are you telling me that you men finished your training on your own?John Winger: That's a fact, Jack.Soldiers: That's a fact, Jack.
ill help you, please provide your full name, and the name of the course, name of the professor so i may put it in header comments.i think i should be able to do it in under an hour, please respond fast
My name is Henry Krinkle. K-R-l-N-K-L-E. Hopper Avenue. You know, like a rabbit. Hip, hop.
> My name is Henry Krinkle. K-R-l-N-K-L-E. Hopper> Avenue. You know, like a rabbit. Hip, hop.You talkin' to me? You talkin' to me?
you aint never had no chicken like that.