java.swingclass testLogin extends JFrame{public testLogin(){

大gg2022-10-04 11:39:541条回答

java.swing
class testLogin extends JFrame
{
public testLogin()
{
setTitle("1234");
setSize(370,450);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JLabel lab=new JLabel(new ImageIcon("1.jpg"));
add(lab);
JLabel lab1=new JLabel("aaa");
lab.add(lab1);
}
public static void main(String[] agrs)
{
testLogin tf=new testLogin();
}
}为什么aaa字符串显示不出来?

已提交,审核后显示!提交回复

共1条回复
leeallen114 共回答了21个问题 | 采纳率81%
import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
class testLogin extends JFrame {
public testLogin() {
setTitle("1234");
setSize(370, 450);
setDefaultCloseOperation(EXIT_ON_CLOSE);
//JFrame中的容器默认布局管理器为Borderlayout,
//所以,在添加组件的时候要按照Borderlayout的规矩来BorderLayout.CENTER,SOUTH,WEST,EAST,NORTH
JLabel lab = new JLabel("1.jpg");//我没图片就不用设了
add(lab,BorderLayout.CENTER);
JLabel lab1 = new JLabel("aaa");
add(lab1,BorderLayout.SOUTH);
//这句话一般放到最后
setVisible(true);
}
public static void main(String[] agrs) {
testLogin tf = new testLogin();
}
}
1年前

相关推荐

public class StaffLogAction extends ActionSupport implements
public class StaffLogAction extends ActionSupport implements SessionAware {
x05private Log logger = LogFactory.getLog(StaffLogAction.class);
mypoppy1年前1
cisra 共回答了19个问题 | 采纳率84.2%
以StaffLogAction字节码内存区域地址为标示,通过日志工程来创建一个该标示的日志输出对象.这个是log4j的普通用法,详情可以参考log4j的相关用法.
--Best wishes! Jason
英语翻译This Power of Attorney extends to any other agencies or
英语翻译
This Power of Attorney extends to any other agencies or parties necessary for the completion of said adoption,and allows MICHAEL GEORGE RICHARDSON to sign said documents in my place as though I had signed them myself.
授权委托书的授权于到前面所提到抚养的必要的各机构各方,允许迈克尔乔治理查德代替我签署该文件
以上的中文是我的答案,可是 in my place as though I had signed them myself,此句未翻译
gdys41年前2
rubyma 共回答了15个问题 | 采纳率93.3%
参考答案:
问2道SAT语法题!1,The habitat in which sequoia trees grow,extends
问2道SAT语法题!
1,The habitat in which sequoia trees grow,extends (这里错了,请问为什么?) from southern oregon to northern california,is kept damp year- round by heavy seasonal rains,cool coastal air,and fog.
2,Chimpanzees in western Africa's Tai forest crack nuts by placing them on tree roots and striking them with stones,a learned behavior probably unique to (我不懂什么时候用to,about,for,等等,记得以前一个题目说to 后跟动词,为什么这里可以是to呢?)chimpanzees in that area.
飘洒的回忆1年前2
24607650 共回答了18个问题 | 采纳率94.4%
1 很明显 is kept已经是动词了.一个句子怎么可能在没有连词的情况下有两个动词?所以extend要改为分词形式 在这里应该改成 extendIng
2 固定搭配 be unique to 没有说后面不可以加动词
分析两个英语单词extend 与extends 在句子中有什么区别
mapbga1年前1
简单就好123 共回答了19个问题 | 采纳率100%
一个是动词原形,用于第一人称,第二人称后面;第二个是动词第三人称单数,用于第三人称后面.
1.The coast line extends about 2 thousand kilometers _______
1.The coast line extends about 2 thousand kilometers ___________.
A.frome east to west B.frome the east to west
C.frome the east to the west D.from the eastern to the western
xiancr1年前2
cyx232 共回答了22个问题 | 采纳率86.4%
A( from east to west) .其实我是看到过这种说法的.要说原因的话,east这类方向词和nature一样,不加冠词.你最好还是强记
英语翻译丝绸之路延伸6000多公里,得名于古代中国的丝绸贸易.我的翻译:The Silk Road extends mo
英语翻译
丝绸之路延伸6000多公里,得名于古代中国的丝绸贸易.
我的翻译:The Silk Road extends more than 6000 kilometers,which was famous for the silk trade of ancient China.
extends后面是否要加to?
是翻译成我这样好,还是分成两句比较好?
The Silk Road extends more than 6000 kilometers.It was famous for the silk trade of ancient China.
因为我觉得用定语从句,which弄不清是指代逗号前面整句话还是单单指silk roads
快乐少年1年前3
nyh9fr2 共回答了23个问题 | 采纳率91.3%
extend是及物动词,后面+to标示“延伸到”,所以不建议加to
可以用it指代,也可以用which引导一个非限定性定语从句,个人觉得都OK诶
silence extends its wings,and behind the shadows of the dark
silence extends its wings,and behind the shadows of the dark alcove the lamp burns
后面半句怎么翻译,成分怎么分析啊,
中毒深1年前1
三教布衣 共回答了18个问题 | 采纳率88.9%
silence extends its wings,and behind the shadows of the dark alcove the lamp burns
沉默展开双翼,黑暗壁龛阴影的背后室灯在燃烧
后一句的主语是the lamp
谓语是burns
behind the shadows of the dark alcove都是修饰语,用来修饰the lamp
英语翻译This extends the company’s portfolio of thermal material
英语翻译
This extends the company’s portfolio of thermal materials to even higher heat spreading capabilities.
狗娃他二叔1年前4
大彩 共回答了18个问题 | 采纳率94.4%
意译:此产品把公司的热材料组合的热传导能力提高至一个更高的水平.
散热能力是“heat dissipation potential”,这里所指的产品是 thermal materials (发热材料),所以不会是指散热能力,而是热传导能力.
英语阅读理解题The period of Middle English extends roughly from the
英语阅读理解题
the period of middle english extends roughly from the twelfth century through the fifteenth.the influence of french (and latin,often by way of french) upon the vocabulary continued throughout this period,the loss of some inflections and the reduction of others accelerated,and many changes took place within the grammatical systems of the language.a typical prose passage,especially one from the later part of the period,will not have such a foreign look to us as the prose of old english,but is will not be mistaken for contemporary writing either.
the period of modern english extends from the sixteenth century to our own day.the early part of this period saw the completion of a *** in vowel distribution that had begun in late middle english and that effectively brought the language to something resembling its present pattern.other important early developments include the stabilizing effect on spelling of the printing press and the beginning of the direct influence of latin,and,to a lesser extent,greek on the vocabulary.later,as english came into contact with other cultures around the world and distinctive dialects of english developed in the many areas which britain had colonized,numerous other languages made small but interesting contributions to our word-stock.
3)it can be inferred from the passage that today_
a)a person can pronounce old english words but cannot understand them
b)an educated person can understand old english but cannot pronounce it
c)even an educated person can not read old english without special training
d)a person with sufficient knowledge of french can understand old english
4)we can infer from the passage that a prose passage from the fifteenth century_
a)looks like foreign language to contemporary english readers
b)looks more like contemporary english than old english
c)can be understood by contemporary readers
d)is almost the same as modern english in grammatical structure
5)what is the most remarkable characteristic of modern english?
a)the emergence of new varieties in many parts of the world
b)gradual changes in its grammatical system
小伙向前冲1年前1
chenzhuo0521 共回答了17个问题 | 采纳率88.2%
3-c; 4-b;
请帮我翻译跟服装有关的一句话!A gown extends all the way to the floor,allow
请帮我翻译跟服装有关的一句话!
A gown extends all the way to the floor,allowing for a sweeping entrance into a room.
重点在后半句,ALLOWING后面!谢谢!
蔡志忠忠1年前2
tornado733 共回答了17个问题 | 采纳率88.2%
就是说这个长袍的样式要考虑到进门时候的拖地情况吧
The Sahara Desert extends for miles
alh_cn1年前2
relin_mumu 共回答了18个问题 | 采纳率88.9%
撒哈拉沙漠绵延数英里
It extends 3,000 miles from Canada through the United States
It extends 3,000 miles from Canada through the United States to Mexico.
201881271年前2
剑落惜花 共回答了27个问题 | 采纳率81.5%
它从加拿大,通过美国,一直到墨西哥,延伸了3000英里.
(可能是一个山脉吧).
一道SAT语法题!The "Mayan Riviera," which 【extends down】 the easte
一道SAT语法题!
The "Mayan Riviera," which 【extends down】 the eastern coast of Mexico,【has many hidden】 caves,one 【of which】 is larger 【than the size】 of Monaco.
括号里哪里错了?能不能把比较的平行结构讲一下?详细一点有分加~
than the size 错了,为什么错
数字旋风我行我速1年前1
xokao 共回答了17个问题 | 采纳率82.4%
注意前后一致
A is larger than B
A 是one of which,是个cave
而后面的B变成了size
cave和size不是一个东西,所以不并列
前面没有划one,所以无法把前面换成size
凡是比较结构,比的两个一定要是相同的性质,要么是两个人比,要么是两个人的某种东西比,要么是两个人做什么事比,要么是size、amount等属性比

大家在问