Java实验06-GUI文件加解密软件,ScrollPanel嵌套Boxlayout,DES分组加密算法,进度条控制

先上效果图,大作业勉强算写了一天半才写出来(疯狂摸鱼我好菜),昨天和同学玩愤怒的小鸟,火柴人大乱斗,红色警戒打到凌晨两点才回宿舍。呜呜呜,摸鱼好快乐。
没什么太大的难度。
直接上效果图吧
在这里插入图片描述

有点丑,单纯不想改UI了,感觉有点浪费时间,要注意可能最会可能出bug的点在于解密时的文件如果密钥修改后会无法解密,注意一下就可。别的地方小bug自己测试一下应该就能发现了。不说了,吃饭去了,有空再更QAQ。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在MATLAB App Designer中实现滚动界面可以使用uifigure和uitab组件。具体步骤如下: 1. 在App Designer中创建一个新的UI Figure,命名为“MainFigure”。 2. 在MainFigure中添加一个uitab组件,命名为“ScrollTab”。 3. 在ScrollTab中添加一个uipanel组件,命名为“ScrollPanel”。 4. 在ScrollPanel中添加需要滚动的UI组件,例如uicontrol或者axes。 5. 在ScrollPanel中添加一个uitable组件,用于显示大量数据。 6. 在ScrollPanel的属性编辑器中将“Position”属性设置为[0 0 1 1],将“Units”属性设置为“normalized”。 7. 在ScrollPanel的属性编辑器中启用“VerticalScrollbar”和“AutoResizeChildren”属性。 8. 在MainFigure的属性编辑器中将“AutoResizeChildren”属性设置为“on”。 9. 在MainFigure的回调函数中添加以下代码实现滚动功能: ``` function ScrollPanelMouseWheel(app, event) scrollPanel = app.ScrollPanel; scrollPanelPosition = scrollPanel.Position; scrollPanelHeight = scrollPanelPosition(4); scrollPanelChildren = scrollPanel.Children; scrollPanelChildrenPosition = scrollPanelChildren(1).Position; scrollPanelChildrenHeight = scrollPanelChildrenPosition(4); scrollPanelChildrenNewPosition = scrollPanelChildrenPosition; scrollDirection = event.VerticalScrollCount; if scrollDirection > 0 && scrollPanelHeight < scrollPanelChildrenHeight scrollPanelChildrenNewPosition(2) = scrollPanelChildrenPosition(2) + scrollPanelHeight/10; elseif scrollDirection < 0 && scrollPanelChildrenPosition(2) > 0 scrollPanelChildrenNewPosition(2) = scrollPanelChildrenPosition(2) - scrollPanelHeight/10; end scrollPanelChildren(1).Position = scrollPanelChildrenNewPosition; end ``` 10. 在MainFigure的回调函数中添加以下代码启用鼠标滚轮事件: ``` function MainFigureWindowScrollWheelFcn(app, event) app.ScrollPanel.UserData = event; app.ScrollPanel.WindowButtonDownFcn(app,event); end ``` 11. 在ScrollPanel的回调函数中添加以下代码响应鼠标滚轮事件: ``` function ScrollPanelWindowButtonDownFcn(app, event) if strcmp(event.EventName, 'WindowScrollWheel') app.ScrollPanelMouseWheel(event); end end ``` 完成以上步骤后,运行App Designer,即可实现滚动界面。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值