首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏全栈程序员必看

    setbackground参数_setoption参数

    HTTP请求允许一个key带多个用逗号分开的values,但是HttpURLConnection只提供了单个操作的方法:setrequestproperty(key,value)

    1.9K20编辑于 2022-10-01
  • 来自专栏计算机工具

    在popupwindow中将监听事件传出到fragment中  PopupWindow简单使用,获取其中控件,进行监听 Android资源int转换为字符串

    setBackground(getResources().getDrawable(R.drawable.unselect)); mImageViewSix . setBackground(getResources setBackground(getResources().getDrawable(R.drawable.unselect)); mImageViewFive. setBackground(getResources : mImageViewOne.setBackground(getResources().getDrawable(R.drawable.unselect)); mImageViewTwo. setBackground setBackground(getResources().getDrawable(R.drawable.selected)); mImageViewSix . setBackground(getResources setBackground(getResources().getDrawable(R.drawable.unselect)); mImageViewFive. setBackground(getResources

    1.9K10编辑于 2024-12-16
  • 来自专栏移动开发专栏

    'setBackgroundDrawable()' is deprecated,setBackgroundDrawable过时

    setBackgroundDrawable()在API 16(4.1)已经过时了 4.1之后有两种方法可以代替: a、setBackgroundResource b、setBackground 例如 : textView.setBackgroundResource(R.drawable.icon); textView.setBackground(ContextCompat.getDrawable(this , R.drawable.icon)); setBackgroundResource方法在内部还是调用的setBackground方法,而 setBackground内部调用的还是setBackgroundDrawable 方法 setBackground源码: public void setBackground(Drawable background) { //noinspection deprecation = 0) { d = mContext.getDrawable(resid); } setBackground(d);//注意这里的调用

    74530编辑于 2022-06-10
  • 来自专栏韩曙亮的移动开发专栏

    【错误记录】Java AWT 图形界面编程报错 ( Exception in thread “main“ java.awt.AWTError: BoxLayout can‘t be shared )

    (Color.BLUE); panel.add(panel1); Panel panel2 = new Panel(); panel2.setBackground (Color.RED); panel.add(panel2); Panel panel3 = new Panel(); panel3.setBackground (Color.BLACK); panel.add(panel3); Panel panel4 = new Panel(); panel4.setBackground (Color.GREEN); panel.add(panel4); Panel panel5 = new Panel(); panel5.setBackground (Color.RED); panel.add(panel2); Panel panel3 = new Panel(); panel3.setBackground

    1K10编辑于 2023-03-30
  • 来自专栏阿策小和尚

    【HarmonyOS 专题】05 简单了解 ShapeElement 背景设置

    ShapeElement shapeElement = new ShapeElement(getContext(), ResourceTable.Graphic_shape_stroke); component01.setBackground Component component02 = (Component) findComponentById(ResourceTable.Id_test_component2); component02.setBackground Component component03 = (Component) findComponentById(ResourceTable.Id_test_component3); component03.setBackground Component component04 = (Component) findComponentById(ResourceTable.Id_test_component4); component04.setBackground Component component06 = (Component) findComponentById(ResourceTable.Id_test_component6); component06.setBackground

    72920编辑于 2022-03-29
  • 来自专栏mathor

    GUI编程

    = 0; MyFrame(int x,int y,int w,int h,Color color) { super("MyFrame" + (++id)); setBackground setBounds(int x,int y,int width,int height) setSize(int width,int height) setLocation(int x,int y) setBackground (new Color(0,0,102)); p.setBounds(50,50,400,400); p.setBackground(new Color(204,204,255 (Color.red); p2.setBackground(Color.yellow); p3.setBackground(Color.blue); p4 .setBackground(Color.green); add(p1);add(p2);add(p3);add(p4); setBounds(x,y,w,h);

    1.2K20发布于 2018-07-24
  • 来自专栏葫芦

    java 按钮复选框监听事件及恢复保存状态

    check; public void go(){ JFrame frame=new JFrame(); panel=new JPanel(); panel3=new JPanel(); panel.setBackground implements ItemListener { public void itemStateChanged(ItemEvent envent){ if(check.isSelected()){ panel.setBackground (Color.blue); text.append("blue \n"); }else{ panel.setBackground(Color.black); text.append("black \n" class ButtonListener implements ActionListener { public void actionPerformed(ActionEvent event){ panel.setBackground class Button2Listener implements ActionListener { public void actionPerformed(ActionEvent event){ panel.setBackground

    2.2K20发布于 2019-05-09
  • 来自专栏韩曙亮的移动开发专栏

    【Java AWT 图形界面编程】Frame 窗口标题栏大小问题 ( Container 容器的空白边框 Insets | 通过调用 frame.getInsets().top 获取窗口标题栏高度 )

    窗口的标题栏覆盖住了 ; 左上角 和 右上角的 组件布局代码如下 : // 绘制左上角布局 Panel panel1 = new Panel(); panel1.setBackground ; frame.add(panel1); // 绘制右上角布局 Panel panel2 = new Panel(); panel2.setBackground / 设置 5 个布局, 分别在 4 个角和 中心位置显示 // 绘制左上角布局 Panel panel1 = new Panel(); panel1.setBackground ; frame.add(panel1); // 绘制右上角布局 Panel panel2 = new Panel(); panel2.setBackground ; frame.add(panel2); // 绘制左下角布局 Panel panel3 = new Panel(); panel3.setBackground

    1.3K30编辑于 2023-03-30
  • 来自专栏韩曙亮的移动开发专栏

    【Java AWT 图形界面编程】Frame 窗口中进行自定义布局 ( AWT 中常用的布局容器 )

    / 设置 5 个布局, 分别在 4 个角和 中心位置显示 // 绘制左上角布局 Panel panel1 = new Panel(); panel1.setBackground ; frame.add(panel1); // 绘制右上角布局 Panel panel2 = new Panel(); panel2.setBackground ; frame.add(panel2); // 绘制左下角布局 Panel panel3 = new Panel(); panel3.setBackground ; frame.add(panel3); // 绘制右下角布局 Panel panel4 = new Panel(); panel4.setBackground ); frame.add(panel4); // 绘制中间布局 Panel panel5 = new Panel(); panel5.setBackground

    94810编辑于 2023-03-30
  • 来自专栏github@hornhuang

    android-自定义组合控件和 自定义组合控件不显示问题

    // 值来源于我们引用的 xml 为减重给对应属性的赋值 mLeftButton.setTextColor(mLeftTextColor); mLeftButton.setBackground mLeftButton.setText(mLeftText); mRightButton.setTextColor(mRightTextColor); mRightButton.setBackground // 值来源于我们引用的 xml 为减重给对应属性的赋值 mLeftButton.setTextColor(mLeftTextColor); mLeftButton.setBackground mLeftButton.setText(mLeftText); mRightButton.setTextColor(mRightTextColor); mRightButton.setBackground mLeftButton.setText(mLeftText); mRightButton.setTextColor(mRightTextColor); mRightButton.setBackground

    1.7K50发布于 2021-09-24
  • 来自专栏韩曙亮的移动开发专栏

    【Java AWT 图形界面编程】设置窗口图标 ( IntelliJ IDEA 的图标资源位置 | 代码实现 | exe4j 设置导出 exe 程序对应的图标资源位置 )

    / 设置 5 个布局, 分别在 4 个角和 中心位置显示 // 绘制左上角布局 Panel panel1 = new Panel(); panel1.setBackground dialog.add(panel1); // 绘制右上角布局 Panel panel2 = new Panel(); panel2.setBackground dialog.add(panel2); // 绘制左下角布局 Panel panel3 = new Panel(); panel3.setBackground dialog.add(panel3); // 绘制右下角布局 Panel panel4 = new Panel(); panel4.setBackground ; dialog.add(panel4); // 绘制中间布局 Panel panel5 = new Panel(); panel5.setBackground

    1.6K20编辑于 2023-03-30
  • 来自专栏Android开发

    Android背景颜色滑动渐变效果(上下滑动,左右滑动)

    Color.parseColor("#ffffff"), Color.parseColor("#009966"),Color.parseColor("#00ff00")}); ll_base.setBackground new int[]{Color.parseColor("#ffffff"), Color.parseColor("#009966")}); ll_base.setBackground Color.parseColor("#ffffff"), Color.parseColor("#009966"), Color.parseColor("#00ff00")}); ll_base.setBackground Color.parseColor("#009966"), Color.parseColor("#00ff00"),Color.parseColor("#000000")}); ll_base.setBackground

    66410编辑于 2025-06-12
  • 来自专栏程序编程之旅

    java---计算器图形界面(无功能)

    this.setLocation(400, 300); //显示位置 this.setSize(250, 320); //组件宽和高 this.setBackground FlowLayout(0));流布局 Panel p = new Panel(); //new 一个面板 p.setSize(230, 30); p.setBackground this.add(new TextArea(28,10)); Panel p1 = new Panel(); p1.setSize(250, 100); p1.setBackground

    60120发布于 2021-01-20
  • 来自专栏雨落凋殇

    [Java] [原创]小学生数学练习题目自动生成系统

    (Color.LIGHT_GRAY); jp1.setBackground(Color.DARK_GRAY); notice.setBackground(Color.DARK_GRAY (Color.ORANGE); pass.setForeground(Color.white); result.setBackground(Color.gray); result.setForeground(Color.white); answerList[21].add(grade); answerList[21].setBackground = 0) { answerList[i].setBackground(Color.darkGray); label[i].setForeground "警告信息", JOptionPane.INFORMATION_MESSAGE); } answerList[21].setBackground

    2.5K31发布于 2019-12-25
  • [python][VTK]vtk安装后测试代码

    vtk.vtkActor() coneActor.SetMapper(coneMapper) ren1 = vtk.vtkRenderer() ren1.AddActor(coneActor) ren1.SetBackground (1.0, 1.0, 1.0)   ren1.SetBackground2(0.1, 0.2, 0.4) ren1.SetGradientBackground(1) renWin = vtk.vtkRenderWindow

    16900编辑于 2025-07-19
  • 来自专栏一些有趣的Python案例

    在王者荣耀角度下分析面向对象程序设计B中23种设计模式之单件模式

    false); add(showLabel); showLabel.setBounds(50,30,140,20); showLabel.setBackground false); add(showLabel); showLabel.setBounds(300,30,230,20); showLabel.setBackground 隶书",Font.BOLD,16)); one=new JButton("马超"); one.setSize(73,30); one.setBackground height,showLabel); two=new JButton("韩信"); two.setSize(73,30); two.setBackground ,showLabel); three=new JButton("猪八戒"); three.setSize(73,30); three.setBackground

    49810发布于 2021-02-02
  • 来自专栏一些有趣的Python案例

    在王者荣耀角度下分析面向对象程序设计B中23种设计模式之单件模式

    false); add(showLabel); showLabel.setBounds(50,30,140,20); showLabel.setBackground false); add(showLabel); showLabel.setBounds(300,30,230,20); showLabel.setBackground 隶书",Font.BOLD,16)); one=new JButton("马超"); one.setSize(73,30); one.setBackground height,showLabel); two=new JButton("韩信"); two.setSize(73,30); two.setBackground ,showLabel); three=new JButton("猪八戒"); three.setSize(73,30); three.setBackground

    54700发布于 2021-01-30
  • 来自专栏Android干货园

    Android源码解析--SwipeMenuListView仿QQ聊天左滑

    SwipeMenuItem item = new SwipeMenuItem(mContext); item.setTitle("Item 1"); item.setBackground menu.addMenuItem(item); item = new SwipeMenuItem(mContext); item.setTitle("Item 2"); item.setBackground getApplicationContext()); // 设置选项背景 showItem.setBackground deleteItem = new SwipeMenuItem( getApplicationContext()); deleteItem.setBackground

    1K10发布于 2018-09-06
  • 来自专栏技术之路

    Qt 学习笔记 TreeWidget 增删改

    =Q_NULLPTR) { previous->setBackground(0,Qt::transparent); previous->setBackground ); } current->setTextColor(0,Qt::blue); current->setTextColor(1,Qt::blue); current->setBackground (0,Qt::red); current->setBackground(1,Qt::red); } void TreeViewView::on_btn_Add_clicked() {

    1.1K80发布于 2018-01-31
  • 来自专栏李蔚蓬的专栏

    Android实战_note1(MyMirror_一款小型摄像处理的App)

    ">#a6000000</color> <color name="white">#FFFFFF</color> <color name="<em>setbackground</em>2">#3FFFFFFF </color> <color name="<em>setbackground</em>3">#00000000</color> <color name="<em>setbackground</em>4">#7e000000 </color> </resources> name属性表示颜色变量名,在java中调用时就是调用这个名称;#3F51B5表示颜色值;调用格式为@color/setbackground。 windowFrame">@android:color/transparent</item> <item name="android:windowBackground">@color/setbackground4 --实心 --> <solid android:color="@color/<em>setbackground</em>2"/> <!

    56120发布于 2018-09-13
领券